Posts
 
Reputation
Joined
Last Seen
Ranked #409
Strength to Increase Rep
+8
Strength to Decrease Rep
-2
93% Quality Score
Upvotes Received
59
Posts with Upvotes
50
Upvoting Members
27
Downvotes Received
3
Posts with Downvotes
3
Downvoting Members
3
7 Commented Posts
~105.28K People Reached
About Me

All-around coder/developer for desktop/web/etc. Windows & Linux admin. Super-User.

Interests
Coding, VB.Net, Python, C, Windows, Linux, Mint, Ubuntu, Embedded Code, Arduino, Raspberry Pi, Art,…
PC Specs
Windows 8/Kubuntu 14.04 (HP Laptop), Windows 7/Ubuntu 13.04 with KDE (HP Desktop), Linux Mint 12 with…
Favorite Tags

132 Posted Topics

Member Avatar for Urbandude23

You have an event loop up at the top (`while done==False:`) that runs until the user has quit. Because of the indention, your event loop runs until completion and only *then* draws what you wanted it to. Your indention signifies a 'code block'.Everything in that code block will run until …

Member Avatar for Prragya
0
5K
Member Avatar for pallen

when you write a view function, it must have a `request` parameter (try writing one without it). This is because Django automatically passes the `HttpRequest()` to your view so you can use it. You don't have to use it, I have plenty of views that do absolutely nothing with the …

Member Avatar for JO_4
0
960
Member Avatar for omGac0W

@sa_2, on line 282 you mixed single quotes with double quotes. The syntax highlighting shows it right here: cout<<' \t\t¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥\n\n\n"; Next time start a new question, so more people can help you.

Member Avatar for chriswelborn
0
581
Member Avatar for Ammar_8

It's been a while since I messed with VB, but I can't find anything that sticks out as far as the overflow situation. It's hard to read anything the way you're building those queries. I'm pretty sure that they're prone to SQL injection anyway. Have you looked at [prepared statements](https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.prepare(v=vs.110).aspx)? …

Member Avatar for chriswelborn
0
883
Member Avatar for geoamins2

I would refer to the API documentation for `DataResult<fmd>`. I'm sure there are methods to help you retrieve the images it captures. I'm not sure which SDK you are using, and the DigitalPersona documentation (which I think you may be using) requires that you purchase support. DigitalPersona does have a …

Member Avatar for caiofoglia
0
7K
Member Avatar for Anton_6

I think it would help if you weren't shadowing the `cosa` name in your `for` loop. Classes should use CamelCase, to distinguish them from function names and other stuff. Instantiating a class is like calling a function, so if you are instantiating a `Cosa`, and not trying to call a …

Member Avatar for chriswelborn
0
574
Member Avatar for sun_2588

The data is compressed with gzip. I tested it with: $ curl http://stores.ebay.com/honesty-seller-ly9999 > bad_data $ file bad_data bad_data: gzip compressed data, from FAT filesystem (MS-DOS, OS/2, NT) The site is served with the header `Content-Encoding: gzip`, which isn't correct unless you request it with a `Accept-encoding: gzip`. Anyway, this …

Member Avatar for chriswelborn
0
300
Member Avatar for mrismich

..Commenting to move from 'Unanswered.' In the future, you may want to provide more information (such as a small example of what you have tried so far). For now, this article will help you learn how to ask smart questions to get smart answers: [How To Ask Questions The Smart …

Member Avatar for Raj chanda
-4
1K
Member Avatar for naz1234

It looks like you are hard coding each possible answer. It would take pages to exhaust every possibility. Maybe try splitting the input on `-`, and parsing the two values you need (using `strsep()` and `sscanf()`). Once you have the two values, you can calculate whatever value you need.

Member Avatar for chriswelborn
0
242
Member Avatar for mrismich

..Commenting to move from 'Unanswered.' In the future, you may want to provide more information (such as a small example of what you have tried so far). For now, this article will help you learn how to ask smart questions to get smart answers: [How To Ask Questions The Smart …

Member Avatar for chriswelborn
-2
109
Member Avatar for mrismich

..Commenting to move from 'Unanswered.' In the future, you may want to provide more information (such as a small example of what you have tried so far). For now, this article will help you learn how to ask smart questions to get smart answers: [How To Ask Questions The Smart …

Member Avatar for chriswelborn
-2
95
Member Avatar for mrismich

..Commenting to move from 'Unanswered.' In the future, you may want to provide more information (such as a small example of what you have tried so far). For now, this article will help you learn how to ask smart questions to get smart answers: [How To Ask Questions The Smart …

Member Avatar for chriswelborn
-2
97
Member Avatar for mrismich

..Commenting to move from 'Unanswered.' In the future,you may want to provide more information (such as a small example of what you have tried so far). For now, this article will help you learn how to ask smart questions to get smart answers: [How To Ask Questions The Smart Way](http://www.catb.org/esr/faqs/smart-questions.html)

Member Avatar for chriswelborn
-1
80
Member Avatar for cgeier

I was about to post this same message. It opens automatically when I load a page, and that's neat, but closing it only lasts for thirty seconds or so. I thought it was a new message when it opened the second time. I guess it just wanted to be open.

Member Avatar for Dani
0
265
Member Avatar for CodeWarrior14

This ID generator depends on enough time elapsing between calls. I can see that running this kind of code in a fast loop could make duplicates: for (int i = 0; i < 10; i++) { Console.WriteLine (DateTime.Now.ToString ("hh-mm-ss.ffff")); } Output: 05-16-12.2358 05-16-12.2779 05-16-12.2780 // <- Many duplicates are created. …

Member Avatar for JOSheaIV
0
151
Member Avatar for blindmailreader

This was posted in the wrong forum (looking for [Software Development -> Java](https://www.daniweb.com/software-development/java/9)). I'm posting to remove from 'Unanswered'.

Member Avatar for chriswelborn
0
86
Member Avatar for madmax9922

Put the form on your page with an id (let's say `'contactForm'`) and css set to `'display: none'`, so it's easily accessible with javascript but initially hidden. Make your "show form" button/link/whatever with an onclick event (there are multiple ways to do this): <a href='#contactForm' onclick='javascript: show_form();'> E-mail me. </a> …

Member Avatar for chriswelborn
0
256
Member Avatar for venk7

What is the content and type of `cfg.project["samples"][0]["files"]["bam"]`? A Tuple/List/Set/Dict? Maybe stepping through a debugger, or even a simple debug-print would help you see what you are getting, or why you're not getting what you think you should. testdata = cfg.project['samples'][0]['files'] print('Actual files content:') print('{!r}'.format(testdata)) print('Actual bam content:') print('{!r}'.format(testdata['bam'])) Also, …

Member Avatar for chriswelborn
0
189
Member Avatar for venk7

This question is difficult to understand. I don't think the wall of output text helps. Maybe you could word it differently, or provide a little pseudo-code to help us understand what exactly you are trying to do? What are the comparisons? A file? What does "takes that to [metadata][phenotype][embryo]" mean? …

Member Avatar for chriswelborn
0
162
Member Avatar for ennoil

All three of these options are working for me: Plain `echo "string" > file`: read -p "What is your variable: " WHATIS echo "This should be a bunch of lines I want this \"variable\" to be embedded it is $WHATIS" > ./test.txt `cat` with `HEREDOC` and variable expansion: read -p …

Member Avatar for chriswelborn
0
2K
Member Avatar for joshuawilson11

What is the actual problem? Is there a traceback when you run it? You say: >while p is less than the length of the list... ..which is basically describing what your code does. Can you give me a more general explanation? Like "I want to shift the ordinance of every …

Member Avatar for chriswelborn
0
237
Member Avatar for fonzali
Member Avatar for fonzali
1
122
Member Avatar for maria anna

I can only find python-based "watermark" plugins at the moment. You may have to make one. The `PIL` or `pillow` libraries can help you work with images. Outside of GIMP, I see the [StegHide](http://steghide.sourceforge.net/) application recommended for this.

Member Avatar for chriswelborn
0
103
Member Avatar for Niloofar24

I see that your `__init__` method is misspelled, but you're gonna want an instance to work with. You have a `calculating` class, but no object. Instantiate the class: mycalc = calculating() ...then use the method (`mycalc.addition`). Also, its good practice in python for classes to start with a capital letter. …

Member Avatar for HiHe
0
10K
Member Avatar for lewashby

`enumerate()` is great for grabbing an index and item at the same time, and `f.tell()` can tell you the current position in the file: for i, line in enumerate(file): print('{lineno} ({pos}): {line}'.format( lineno=i + 1, pos=file.tell(), line=line))

Member Avatar for lewashby
0
204
Member Avatar for chriswelborn
Member Avatar for tucker046

You could use `RegEx`, but that may be overkill. I think `GetFiles` supports glob matching like `GetFiles("C:\dir", "*.exe")`, but you don't want to call `GetFiles` multiple times. So maybe a simple `If` statement would suffice: If IO.Path.GetExtension(s) = ".exe" Then MyOtherBox.Items.Add(IO.Path.GetFileNameWithoutExtension(s)) Else WithoutThisTypeBox.Items.Add(IO.Path.GetFileNameWithoutExtension(s)) End If My VB.Net is rusty, but …

Member Avatar for tucker046
0
449
Member Avatar for tatendamiriam.mungombe

Sounds like homework. If you post what you have tried so far I'm sure you would receive the help you are looking for.

Member Avatar for Arshad_2
0
124
Member Avatar for vegaseat

This is an old post, but I didn't see any translation tables in here. So here you go, a less secure encryption method for low-risk data: rot13 = str.maketrans( 'ABCDEFGHIJKLMabcdefghijklmNOPQRSTUVWXYZnopqrstuvwxyz', 'NOPQRSTUVWXYZnopqrstuvwxyzABCDEFGHIJKLMabcdefghijklm') encrypted = 'This is encrypted'.translate(rot13) print(encrypted) decrypted = encrypted.translate(rot13) print(decrypted) You can make the translation tables almost anything you …

Member Avatar for Lardmeister
3
1K
Member Avatar for shimanto.khan.758_1

This would probably be better for [Shell Scripting](https://www.daniweb.com/software-development/shell-scripting/113) [Snippets](https://www.daniweb.com/software-development/shell-scripting/code/_/113). Also, some [code formatting](https://www.daniweb.com/community/syntax) would help.

Member Avatar for chriswelborn
1
135
Member Avatar for Dani

I kinda wish you could toggle a live preview for the editor. It shouldn't be shown all the time (might be bad for large posts), but when it's shown it would automatically update the preview. I've seen this on other sites and I really like it. It helps me check …

Member Avatar for Reverend Jim
1
865
Member Avatar for gtcorwin

just type it out. Put a blank line before the code, make sure all of the code lines are indented with 4 spaces. # I did not use the </>Code button. print('Hello World.') You can also use the tilde character (\`) to do "inline code" such as this: `int c …

Member Avatar for deceptikon
0
171
Member Avatar for photoguy77

What is the error? Copy and paste the stacktrace/output. Also, formatting your code would help you get an answer. It makes it much easier to spot simple errors. Use the "</> Code" button, and paste your code there, or just make sure it is all indented with 4 spaces.

Member Avatar for chriswelborn
0
373
Member Avatar for kww228

I took a different approach to solving this problem. Instead of grepping for newline characters from the start, I used the `file` command to tell me the mime type of the file. If the file is binary, then nothing is done. If the file is a text file, it is …

Member Avatar for chriswelborn
0
861
Member Avatar for CheapApples12

You'll need to use something like [OCR](en.wikipedia.org/wiki/Optical_character_recognition). I've never messed with it myself, but I can see from a quick google search that there are [libraries](http://www.atalasoft.com/products/dotimage/ocr/tesseract) available for .Net.

Member Avatar for chriswelborn
0
143
Member Avatar for Daniel Angelo
Member Avatar for Daniel Angelo

3 posts for 1 question? Usually people don't just write programs for you here. Why does it have to be in Turbo C? Can it be in C?

Member Avatar for Daniel Angelo
0
120
Member Avatar for Daniel Angelo
Member Avatar for vegaseat

You could also do this with a `Process`. import functools import multiprocessing def background(func): @functools.wraps(func) def wrapper(*args, **kwargs): p = multiprocessing.Process(target=func, args=args, kwargs=kwargs) p.start() return wrapper Also, I wanted to point something out for new people that may be reading this. I think it's a good practice to use the …

Member Avatar for Lardmeister
5
3K
Member Avatar for Darkzero45

I always say that it helps to have a problem to solve. Find something you want to do, maybe a tool to make your everyday tasks easier, or making a better version of some tool you use. Find something that interests you and just start trying to make it. It …

Member Avatar for DonnSchwartz
0
119
Member Avatar for Gribouillis

I like this. I modified it so the function name would be included with `frame.f_code.co_name`.

Member Avatar for Gribouillis
5
961
Member Avatar for ogsirus

You are talking about very low-level stuff, which would vary depending on the BIOS. I doubt this functionality is baked in to the .Net framework. It would pose serious security risks if the BIOS password could be easily set by just any .Net application (Administrator or not).

Member Avatar for humorousone
0
202
Member Avatar for codewar

Are you sure that `Session["LastName"]` is being set properly in the first place? I mean the cookie is being set properly? I think the only reason your new code wouldn't work is if `Session["LastName"]` is `null`. And yes, the `string lastName = (string)Session["LastName"];` replacement would be correct.

Member Avatar for JorgeM
0
304
Member Avatar for tubs1

scripts or libraries? For libraries I would look at [PyPi](http://pypi.python.org), that is the standard. For scripts, there is no "gold standard". Just google for whatever tool you are looking for. If most of the results happen to come from Github then so be it.

Member Avatar for chriswelborn
0
199
Member Avatar for Dukey1

This comment is here to remove this crazy post from `Unanswered`. Don't ask people to write software/patches for you.

Member Avatar for chriswelborn
-3
87
Member Avatar for BibhutiAlmighty

using System; using System.Collections.Generic; // Creating and adding answers. Dictionary<String, String> answers = new Dictionary<String, String> () { {"mykey1", "myanswer1"}, {"mykey2", "myanswer2"} }; // Adding on the fly. answers.Add ("mykey3", "myanswer3"); // Retrieving answers. String trykey = "mykey2"; String answer; Boolean retrieved = answers.TryGetValue (trykey, out answer); if (retrieved) { …

Member Avatar for chriswelborn
0
221
Member Avatar for amraam

You could look at making a [cgi](https://docs.python.org/3.4/library/cgi.html) script, but I don't recommend it. You should look into [HTML](www.w3schools.com/html/)/[JavaScript](http://www.w3schools.com/js/) and [AJAX](http://www.w3schools.com/ajax/default.ASP)/[Forms](http://www.w3schools.com/html/html_forms.asp), and make a Python backend like [Flask](http://flask.pocoo.org/), [Django](http://djangoproject.com), or [Bottle](http://bottlepy.org). Basically you have a Python app running server-side, that accepts a [GET](http://www.w3schools.com/tags/ref_httpmethods.asp) or [POST](http://www.w3schools.com/tags/ref_httpmethods.asp) request. A GET request would look …

Member Avatar for amraam
0
6K
Member Avatar for chriswelborn

I think Snippets and Tutorials should be excluded from 'Unanswered', or a new section should be created called 'Open Questions' that doesn't include snippets and tutorials. Most of the snippets/tutorials don't receive an answer for a long time and they cloud the view when looking for a quick question to …

Member Avatar for Dani
2
331
Member Avatar for mark103

If I understand your problem, you want to scale the button size based on how long a show runs? Kinda like the guide on a cable box? Here is one solution I came up with, I broke it into functions to make it easier to read: # Needed to parse …

Member Avatar for chriswelborn
0
183
Member Avatar for Jai_4

The odd numbers in your example are 2 and 4. So 6 is correct. The even number in your example is 3. So 3 is correct. I would've probably did something like this: def findproductandsum(userinput): # Initialize counters. finalproduct, finalsum = 1, 0 # Iterate over index and character in …

Member Avatar for sneekula
0
802

The End.