PostId
int64
13
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
3
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-33
210k
OwnerUndeletedAnswerCountAtPostTime
int64
0
5.77k
Title
stringlengths
10
250
BodyMarkdown
stringlengths
12
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
47
30.1k
OpenStatus_id
int64
0
4
5,725,546
04/20/2011 04:34:36
670,694
03/22/2011 06:27:03
1
0
To start our application when user selects a file to share
I am developing an application to share files between two devices. My task is to pin my application to the 'share menu' or 'send via menu' so that my application get started when the user want to share it through my application. If anybody knows how to resolve this please answer. Thanks
android
null
null
null
null
null
open
To start our application when user selects a file to share === I am developing an application to share files between two devices. My task is to pin my application to the 'share menu' or 'send via menu' so that my application get started when the user want to share it through my application. If anybody knows how to resolve this please answer. Thanks
0
4,999,640
02/15/2011 03:31:36
494,901
11/02/2010 15:14:22
124
3
CSS Sprites: An easy way to do a generic unordered list?
I'm trying to do CSS Sprites, such as: http://www.alistapart.com/articles/sprites My menu is going to dynamically generated via Wordpress. I have 3 basic states: always on, hover and active. This will be the same state for all buttons. I want to use a basic underorded list such as: <div class="navigation"> <ul> <li><a href="#">Link 1</a></li> <li><a href="#">Link 1</a></li> <li><a href="#">Link 1</a></li> <li><a href="#">Link 1</a></li> </ul> </div> Every technique I've seen uses ID's on either the LI or A state's, is there away to do this using the basic structure above?
css
css-sprites
null
null
null
null
open
CSS Sprites: An easy way to do a generic unordered list? === I'm trying to do CSS Sprites, such as: http://www.alistapart.com/articles/sprites My menu is going to dynamically generated via Wordpress. I have 3 basic states: always on, hover and active. This will be the same state for all buttons. I want to use a basic underorded list such as: <div class="navigation"> <ul> <li><a href="#">Link 1</a></li> <li><a href="#">Link 1</a></li> <li><a href="#">Link 1</a></li> <li><a href="#">Link 1</a></li> </ul> </div> Every technique I've seen uses ID's on either the LI or A state's, is there away to do this using the basic structure above?
0
6,182,144
05/31/2011 01:33:46
776,950
05/31/2011 01:33:46
1
0
I don't understand what return does in programming?
The question basically says it all. I'm a noob so make it gentle.
java
c++
null
null
null
05/31/2011 03:04:39
not a real question
I don't understand what return does in programming? === The question basically says it all. I'm a noob so make it gentle.
1
6,286,872
06/09/2011 00:36:50
1,395,320
02/15/2011 05:16:45
22
0
What is the category I should choose for my Android App?
I have a app called PlayText which lets you to listen to the text from websites as audio.(It's some kind of voice browser) I have choosen the category as Productivity..Whether that is the right category for it?
android
android-market
null
null
null
06/10/2011 21:16:56
off topic
What is the category I should choose for my Android App? === I have a app called PlayText which lets you to listen to the text from websites as audio.(It's some kind of voice browser) I have choosen the category as Productivity..Whether that is the right category for it?
2
5,231,672
03/08/2011 11:14:31
649,689
03/08/2011 11:10:39
1
0
What are the key points to be consider while developing Web site in asp.net?
I am new to .net And want to develope the web site..
c#
asp.net
null
null
null
03/08/2011 12:05:14
not a real question
What are the key points to be consider while developing Web site in asp.net? === I am new to .net And want to develope the web site..
1
8,609,346
12/22/2011 20:26:19
1,112,102
12/22/2011 16:31:00
1
0
Learn Objective C after Python instead of C++?
I'll just go straight to point on this one; I am 15 years old and currently using Python to get the basics of programming down (have used it for 2 days). My goal is to become a game developer, if lucky start my own company. The games i have in mind is actually full length games like Skyrim, Battlefield 3, etc. As i've searched the internet for knowledge i have come to the understanding that i need/should to learn C++ and Lua. But before this i really want to create app games for the IOS market. Now my question is: Is the best thing to do in my situation to go straight from Python to Objective C, then to C++ then to Lua. Or should i go Python, Objective C, C++ then Lua? *Extra question for those who wants to answer it: Is it possible to use Objective C on windows?
c++
null
null
null
null
12/22/2011 20:32:28
off topic
Learn Objective C after Python instead of C++? === I'll just go straight to point on this one; I am 15 years old and currently using Python to get the basics of programming down (have used it for 2 days). My goal is to become a game developer, if lucky start my own company. The games i have in mind is actually full length games like Skyrim, Battlefield 3, etc. As i've searched the internet for knowledge i have come to the understanding that i need/should to learn C++ and Lua. But before this i really want to create app games for the IOS market. Now my question is: Is the best thing to do in my situation to go straight from Python to Objective C, then to C++ then to Lua. Or should i go Python, Objective C, C++ then Lua? *Extra question for those who wants to answer it: Is it possible to use Objective C on windows?
2
10,016,257
04/04/2012 17:25:54
1,207,209
02/13/2012 16:11:29
1
0
php how can I display a list state and cities in a list
my database setup is going to be this: **state** **city** alabama auburn alabama birmingham alabama decatur ohio cleveland ohio dayton etc.. etc.. So I want it to echo out like this **alabama** auburn birmingham decatur **ohio** cleveland dayton **etc** etc...
php
mysql
database
foreach
null
04/04/2012 20:09:06
not a real question
php how can I display a list state and cities in a list === my database setup is going to be this: **state** **city** alabama auburn alabama birmingham alabama decatur ohio cleveland ohio dayton etc.. etc.. So I want it to echo out like this **alabama** auburn birmingham decatur **ohio** cleveland dayton **etc** etc...
1
11,128,599
06/20/2012 21:38:57
268,936
02/08/2010 19:48:07
689
4
What are some reasons not to use unique_ptr<> as a class member?
I'm trying to determine uses cases where it's appropriate or advisable to use this smart pointer to contain class members that are pointers.
c++
boost
c++11
smart-pointers
null
06/20/2012 21:53:54
not a real question
What are some reasons not to use unique_ptr<> as a class member? === I'm trying to determine uses cases where it's appropriate or advisable to use this smart pointer to contain class members that are pointers.
1
5,307,039
03/15/2011 02:59:21
659,879
03/15/2011 02:55:11
1
0
Kickstarter clone in Drupal?
I would like to create a Kickstarter type clone in terms of functionality. Can Drupal produce a ***crude*** prototype? Or suck it up, hit the books and learn python/django or ruby/rails. I appreciate any and all input.
python
ruby-on-rails
ruby
django
drupal
03/15/2011 04:20:33
not constructive
Kickstarter clone in Drupal? === I would like to create a Kickstarter type clone in terms of functionality. Can Drupal produce a ***crude*** prototype? Or suck it up, hit the books and learn python/django or ruby/rails. I appreciate any and all input.
4
10,517,499
05/09/2012 13:49:59
1,309,228
04/02/2012 23:28:34
9
0
Change Link color on div hover
I have a div that has a link in it, right now if I hover over the link it chnages color, but I want to hover over the div aswell to chnage the color, here is the code: <div class="first_product margin_right left"> <a href="/link"> </a><div class="first_product_text"><a href="/link"></a><a href="link">Automation&nbsp;<span>+</span></a></div> </div>
class
hover
null
null
null
null
open
Change Link color on div hover === I have a div that has a link in it, right now if I hover over the link it chnages color, but I want to hover over the div aswell to chnage the color, here is the code: <div class="first_product margin_right left"> <a href="/link"> </a><div class="first_product_text"><a href="/link"></a><a href="link">Automation&nbsp;<span>+</span></a></div> </div>
0
8,496,716
12/13/2011 21:52:50
1,013,552
10/25/2011 21:05:04
44
0
Removing windows serivce with uninstall shortcut in start menu
How to make uninstall shortcut in start menu to remove windows service from computer? I have created deployment porject which installs windows service. For now the only way to remove this service is Control Panel/Add remove programs...
c#
deployment
windows-services
setup-project
uninstall
12/13/2011 22:22:26
off topic
Removing windows serivce with uninstall shortcut in start menu === How to make uninstall shortcut in start menu to remove windows service from computer? I have created deployment porject which installs windows service. For now the only way to remove this service is Control Panel/Add remove programs...
2
9,927,284
03/29/2012 14:21:30
277,603
02/20/2010 10:57:14
1,363
8
Top command special characters in shell script
In the following command i get special characters in alert.txt for the top output.How can i prevent it.... #!/bin/sh topsnapshot=`top -n 5` echo -e "\n\n===========================TOP COMMAND SNAPSHOT====================================================" > /tmp/alert.txt echo "$topsnapshot" >> /tmp/alert.txt Output: ===========================TOP COMMAND SNAPSHOT==================================================== ^[[H^[[2J^[(B^[[mtop - 18:56:01 up 112 days, 18:22, 5 users, load average: 0.99, 0.73, 0.33^[(B^[[m^[[39;49m^[[K Tasks:^[(B^[[m^[[39;49m^[(B^[[m 142 ^[(B^[[m^[[39;49mtotal,^[(B^[[m^[[39;49m^[(B^[[m 2 ^[(B^[[m^[[39;49mrunning,^[(B^[[m^[[39;49m^[(B^[[m 139 ^[(B^[[m^[[39;49msleeping,^[(B^[[m^[[39;49m^[(B^[[m 0 ^[(B^[[m^[[39;49mstopped,^[(B^[[m^[[39;49m^[(B^[[m 1 ^[(B^[[m^[[39;49mzombie^[(B^[[m^[[39;49m^[[K Cpu(s):^[(B^[[m^[[39;49m^[(B^[[m 0.2%^[(B^[[m^[[39;49mus,^[(B^[[m^[[39;49m^[(B^[[m 0.2%^[(B^[[m^[[39;49msy,^[(B^[[m^[[39;49m^[(B^[[m 0.0%^[(B^[[m^[[39;49mni,^[(B^[[m^[[39;49m^[(B^[[m 99.1%^[(B^[[m^[[39;49mid,^[(B^[[m^[[39;49m^[(B^[[m 0.4%^[(B^[[m^[[39;49mwa,^[(B^[[m^[[39;49m^[(B^[[m 0.0%^[(B^[[m^[[39;49mhi,^[(B^[[m^[[39;49m^[(B^[[m 0.0%^[(B^[[m^[[39;49msi,^[(B^[[m^[[39;49m^[(B^[[m 0.0%^[(B^[[m^[[39;49mst^[(B^[[m^[[39;49m^[[K Mem: ^[(B^[[m^[[39;49m^[(B^[[m 4142428k ^[(B^[[m^[[39;49mtotal,^[(B^[[m^[[39;49m^[(B^[[m 2291280k ^[(B^[[m^[[39;49mused,^[(B^[[m^[[39;49m^[(B^[[m 1851148k ^[(B^[[m^[[39;49mfree,^[(B^[[m^[[39;49m^[(B^[[m 569928k ^[(B^[[m^[[39;49mbuffers^[(B^[[m^[[39;49m^[[K Swap:^[(B^[[m^[[39;49m^[(B^[[m 5668856k ^[(B^[[m^[[39;49mtotal,^[(B^[[m^[[39;49m^[(B^[[m 76k ^[(B^[[m^[[39;49mused,^[(B^[[m^[[39;49m^[(B^[[m 5668780k ^[(B^[[m^[[39;49mfree,^[(B^[[m^[[39;49m^[(B^[[m 1088948k ^[(B^[[m^[[39;49mcached^[(B^[[m^[[39;49m^[[K ^[[6;1H ^[[7m PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND ^[(B^[[m^[[39;49m^[[K ^[(B^[[m^[(B^[[m31832 root 25 0 6072 2100 1228 R 99.2 0.1 6:40.14 t.py ^[(B^[[m^[[39;49m ^[(B^[[m 1 root 15 0 2160 644 556 S 0.0 0.0 0:17.83 init
linux
shell
script
command
top
04/01/2012 19:04:41
too localized
Top command special characters in shell script === In the following command i get special characters in alert.txt for the top output.How can i prevent it.... #!/bin/sh topsnapshot=`top -n 5` echo -e "\n\n===========================TOP COMMAND SNAPSHOT====================================================" > /tmp/alert.txt echo "$topsnapshot" >> /tmp/alert.txt Output: ===========================TOP COMMAND SNAPSHOT==================================================== ^[[H^[[2J^[(B^[[mtop - 18:56:01 up 112 days, 18:22, 5 users, load average: 0.99, 0.73, 0.33^[(B^[[m^[[39;49m^[[K Tasks:^[(B^[[m^[[39;49m^[(B^[[m 142 ^[(B^[[m^[[39;49mtotal,^[(B^[[m^[[39;49m^[(B^[[m 2 ^[(B^[[m^[[39;49mrunning,^[(B^[[m^[[39;49m^[(B^[[m 139 ^[(B^[[m^[[39;49msleeping,^[(B^[[m^[[39;49m^[(B^[[m 0 ^[(B^[[m^[[39;49mstopped,^[(B^[[m^[[39;49m^[(B^[[m 1 ^[(B^[[m^[[39;49mzombie^[(B^[[m^[[39;49m^[[K Cpu(s):^[(B^[[m^[[39;49m^[(B^[[m 0.2%^[(B^[[m^[[39;49mus,^[(B^[[m^[[39;49m^[(B^[[m 0.2%^[(B^[[m^[[39;49msy,^[(B^[[m^[[39;49m^[(B^[[m 0.0%^[(B^[[m^[[39;49mni,^[(B^[[m^[[39;49m^[(B^[[m 99.1%^[(B^[[m^[[39;49mid,^[(B^[[m^[[39;49m^[(B^[[m 0.4%^[(B^[[m^[[39;49mwa,^[(B^[[m^[[39;49m^[(B^[[m 0.0%^[(B^[[m^[[39;49mhi,^[(B^[[m^[[39;49m^[(B^[[m 0.0%^[(B^[[m^[[39;49msi,^[(B^[[m^[[39;49m^[(B^[[m 0.0%^[(B^[[m^[[39;49mst^[(B^[[m^[[39;49m^[[K Mem: ^[(B^[[m^[[39;49m^[(B^[[m 4142428k ^[(B^[[m^[[39;49mtotal,^[(B^[[m^[[39;49m^[(B^[[m 2291280k ^[(B^[[m^[[39;49mused,^[(B^[[m^[[39;49m^[(B^[[m 1851148k ^[(B^[[m^[[39;49mfree,^[(B^[[m^[[39;49m^[(B^[[m 569928k ^[(B^[[m^[[39;49mbuffers^[(B^[[m^[[39;49m^[[K Swap:^[(B^[[m^[[39;49m^[(B^[[m 5668856k ^[(B^[[m^[[39;49mtotal,^[(B^[[m^[[39;49m^[(B^[[m 76k ^[(B^[[m^[[39;49mused,^[(B^[[m^[[39;49m^[(B^[[m 5668780k ^[(B^[[m^[[39;49mfree,^[(B^[[m^[[39;49m^[(B^[[m 1088948k ^[(B^[[m^[[39;49mcached^[(B^[[m^[[39;49m^[[K ^[[6;1H ^[[7m PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND ^[(B^[[m^[[39;49m^[[K ^[(B^[[m^[(B^[[m31832 root 25 0 6072 2100 1228 R 99.2 0.1 6:40.14 t.py ^[(B^[[m^[[39;49m ^[(B^[[m 1 root 15 0 2160 644 556 S 0.0 0.0 0:17.83 init
3
3,630,609
09/02/2010 19:42:21
438,336
09/02/2010 19:42:21
1
0
Reading unicode character in java
I'm a bit new to java, When I assign a unicode string to String str = "\u0142o\u017Cy\u0142"; System.out.println(str); final StringBuilder stringBuilder = new StringBuilder(); InputStream inStream = new FileInputStream("C:/a.txt"); final InputStreamReader streamReader = new InputStreamReader(inStream, "UTF-8"); final BufferedReader bufferedReader = new BufferedReader(streamReader); String line = ""; while ((line = bufferedReader.readLine()) != null) { System.out.println(line); stringBuilder.append(line); } Why are the results different in both cases the file a.txt also contains the same string. but when i print output of the file it prints z\u0142o\u017Cy\u0142 instead of the actual unicode characters. Any idea how do i do this if i want to file content also to be printed as string is being printed.
java
file
unicode
reading
null
null
open
Reading unicode character in java === I'm a bit new to java, When I assign a unicode string to String str = "\u0142o\u017Cy\u0142"; System.out.println(str); final StringBuilder stringBuilder = new StringBuilder(); InputStream inStream = new FileInputStream("C:/a.txt"); final InputStreamReader streamReader = new InputStreamReader(inStream, "UTF-8"); final BufferedReader bufferedReader = new BufferedReader(streamReader); String line = ""; while ((line = bufferedReader.readLine()) != null) { System.out.println(line); stringBuilder.append(line); } Why are the results different in both cases the file a.txt also contains the same string. but when i print output of the file it prints z\u0142o\u017Cy\u0142 instead of the actual unicode characters. Any idea how do i do this if i want to file content also to be printed as string is being printed.
0
3,610,976
08/31/2010 16:13:12
26,227
10/08/2008 17:50:42
12,072
788
Generating lists of satisfying values for a set of constraints
Given a set of constraints, I would like to efficiently generate the set of values. Suppose I have a few constraints on my Thungus[1]: goodThungus(X) :- X > 100, X < 1000. sin(X) = 0. Now, I can *check* a Thungus by asking: goodThungus(500). I would like to generate *all good Thungi*. I'm not sure how to do that; I'm *really* not sure about how to do it efficiently. [1] Arbitrary object selected for this example.
prolog
null
null
null
null
null
open
Generating lists of satisfying values for a set of constraints === Given a set of constraints, I would like to efficiently generate the set of values. Suppose I have a few constraints on my Thungus[1]: goodThungus(X) :- X > 100, X < 1000. sin(X) = 0. Now, I can *check* a Thungus by asking: goodThungus(500). I would like to generate *all good Thungi*. I'm not sure how to do that; I'm *really* not sure about how to do it efficiently. [1] Arbitrary object selected for this example.
0
7,412,985
09/14/2011 07:54:42
941,815
09/13/2011 05:03:32
3
0
Putting Query Results Inside Array to PHP Email Attachments
I seriously don't know how to do this. The user is allowed to attached as many recipe.pdf they want.. but i don't know how to put it inside array. Can you guys show me how? Here's my code. include('connect.php'); $db = mysql_connect($db_host, $db_username, $db_password); mysql_select_db($db_database); $result = mysql_query("SELECT * FROM recipe_list"); echo "<ul>"; while ($row = mysql_fetch_row($result)) { foreach($row as $recipe) echo "<li>"<input type='checkbox[]' value='".$recipe."' checked /><label>".$recipe."</label></li>"; } echo "</ul>"; mysql_free_result($result); Next Code is the Part where I have the Email Attachments.. I seriously don't know how to do the array part. $file_folder = "/home/rdash/public_html/recipes/"; $recipes = array("recipe_001.pdf","recipe_002.pdf"); $files = array ($file_folder.$recipes[0], $file_folder.$recipes[1]); In this code, i already input pdf names. But how am i going to **pull the $recipe from the first code?** I'm talking about the recipes from the query results. The one with the checkboxes. Please help me. **If you'll need more details. Just ask :) Thanks**
php
mysql
arrays
foreach
email-attachments
09/14/2011 11:27:56
too localized
Putting Query Results Inside Array to PHP Email Attachments === I seriously don't know how to do this. The user is allowed to attached as many recipe.pdf they want.. but i don't know how to put it inside array. Can you guys show me how? Here's my code. include('connect.php'); $db = mysql_connect($db_host, $db_username, $db_password); mysql_select_db($db_database); $result = mysql_query("SELECT * FROM recipe_list"); echo "<ul>"; while ($row = mysql_fetch_row($result)) { foreach($row as $recipe) echo "<li>"<input type='checkbox[]' value='".$recipe."' checked /><label>".$recipe."</label></li>"; } echo "</ul>"; mysql_free_result($result); Next Code is the Part where I have the Email Attachments.. I seriously don't know how to do the array part. $file_folder = "/home/rdash/public_html/recipes/"; $recipes = array("recipe_001.pdf","recipe_002.pdf"); $files = array ($file_folder.$recipes[0], $file_folder.$recipes[1]); In this code, i already input pdf names. But how am i going to **pull the $recipe from the first code?** I'm talking about the recipes from the query results. The one with the checkboxes. Please help me. **If you'll need more details. Just ask :) Thanks**
3
11,306,535
07/03/2012 07:42:48
1,497,880
07/03/2012 06:22:10
1
0
Most useful Mac terminal commands for hacker detection?
What is the most accurate Unix command to enter in mac terminal to discover a hacker/suspect activity besides who, whoami, nslookup, etc? I am okay with HTML coding but a Linux/Unix neophyte, backwards, I suppose .
osx
unix
linux-kernel
terminal
hacking
07/04/2012 03:23:25
off topic
Most useful Mac terminal commands for hacker detection? === What is the most accurate Unix command to enter in mac terminal to discover a hacker/suspect activity besides who, whoami, nslookup, etc? I am okay with HTML coding but a Linux/Unix neophyte, backwards, I suppose .
2
9,930,501
03/29/2012 17:37:40
221,683
11/30/2009 22:36:02
469
7
Package Not Found - The requested package does not exist or has been deleted
I've uploaded a beta version of a Salesforce app but when I try and install it in a sandbox account it says... > Package Not Found > > The requested package does not exist or has been deleted. Please > contact the package publisher for assistance. If this is a recently > uploaded package, please try again soon. How long do I have to wait? The package does appear to exists because when I try and install it in the dev account it says that its already installed.
salesforce
null
null
null
null
03/30/2012 17:58:36
off topic
Package Not Found - The requested package does not exist or has been deleted === I've uploaded a beta version of a Salesforce app but when I try and install it in a sandbox account it says... > Package Not Found > > The requested package does not exist or has been deleted. Please > contact the package publisher for assistance. If this is a recently > uploaded package, please try again soon. How long do I have to wait? The package does appear to exists because when I try and install it in the dev account it says that its already installed.
2
11,720,602
07/30/2012 11:28:39
1,560,821
07/29/2012 10:26:11
1
0
Why isn't whenM part of 'base'?
`whenM` (and `unlessM`, and `ifM`) seems to me a very useful function. It lets one write: whenM (doesDirectoryExist dir) ... instead of dirExists <- doesDirectoryExist dir when (dirExists) ... A while ago I got the impression, based on an old documentation of 'base' google gave me, that it was in 'base' (I may be wrong). But now it's in a separate package, 'IfElse'. Why is that? Shouldn't this bread-and-butter be in Control.Monad? Another question: the xmonad guys have a `whenX` function, which is equivalent to `whenM` except it's hardcoded to work in the `X` monad. Why is that? Why not just use `whenM`? Is it to avoid having a trivial dependency on 'IfElse'? Or is it to make the compiler's error message easier to grasp?
haskell
null
null
null
null
07/30/2012 15:18:56
not constructive
Why isn't whenM part of 'base'? === `whenM` (and `unlessM`, and `ifM`) seems to me a very useful function. It lets one write: whenM (doesDirectoryExist dir) ... instead of dirExists <- doesDirectoryExist dir when (dirExists) ... A while ago I got the impression, based on an old documentation of 'base' google gave me, that it was in 'base' (I may be wrong). But now it's in a separate package, 'IfElse'. Why is that? Shouldn't this bread-and-butter be in Control.Monad? Another question: the xmonad guys have a `whenX` function, which is equivalent to `whenM` except it's hardcoded to work in the `X` monad. Why is that? Why not just use `whenM`? Is it to avoid having a trivial dependency on 'IfElse'? Or is it to make the compiler's error message easier to grasp?
4
10,848,845
06/01/2012 10:47:18
1,425,606
05/30/2012 09:05:22
3
0
how to upload bmp bitmap image in silverlight?
I am writing code in silverlight, I want to upload images on my silverlihgt application. Please help me how do I upload bitmap images and show them on interface. If I am wrong please sort it out.thanks
c#
silverlight
image
upload
display
null
open
how to upload bmp bitmap image in silverlight? === I am writing code in silverlight, I want to upload images on my silverlihgt application. Please help me how do I upload bitmap images and show them on interface. If I am wrong please sort it out.thanks
0
7,390,172
09/12/2011 15:20:27
940,857
09/12/2011 15:20:27
1
0
question about bottom code in asp(c#)
**hi..i dont understand these codes....please comment me** string cbref = Page.ClientScript.GetCallbackEventReference(this, "arg", "GetFromServer", "context"); string cbSrc = string.Format("function UseCallBack(arg,context) {{ {0}; }}", cbref); Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "UseCallBack", cbSrc, true); TBAfter.Visible = false; int RowCount = Bind_Exit_Categorys();//howmany row added ago Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "CountVar", "var CountRow=" + RowCount, true);
asp.net
asp.net-ajax
null
null
null
09/12/2011 15:29:42
not a real question
question about bottom code in asp(c#) === **hi..i dont understand these codes....please comment me** string cbref = Page.ClientScript.GetCallbackEventReference(this, "arg", "GetFromServer", "context"); string cbSrc = string.Format("function UseCallBack(arg,context) {{ {0}; }}", cbref); Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "UseCallBack", cbSrc, true); TBAfter.Visible = false; int RowCount = Bind_Exit_Categorys();//howmany row added ago Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "CountVar", "var CountRow=" + RowCount, true);
1
2,536,668
03/29/2010 08:41:51
293,995
03/15/2010 13:30:18
23
0
Make outgoing call with built-in modem in C#
I have to call phone number and detect if the modem at the opposite side is hang-on. How can I do this in C# ? With SerialPort ? Thanks in advance BEst regards
modem
c#
call
detect
null
null
open
Make outgoing call with built-in modem in C# === I have to call phone number and detect if the modem at the opposite side is hang-on. How can I do this in C# ? With SerialPort ? Thanks in advance BEst regards
0
9,228,749
02/10/2012 13:49:29
196,919
10/26/2009 21:39:42
910
104
Approach to show up some part of the webpage in WPF application
I am just wondering if there is any approach to catch only some part of the web page using WPF and show up it? Any ideas? *Thank you!*
c#
.net
wpf
null
null
null
open
Approach to show up some part of the webpage in WPF application === I am just wondering if there is any approach to catch only some part of the web page using WPF and show up it? Any ideas? *Thank you!*
0
8,917,118
01/18/2012 20:44:39
991,484
10/12/2011 13:03:34
329
2
C / C++ without compiling, can it be done? Read on
My general idea is as follows: Create a set of pre-compiled basic routines for standard types, operators and so forth. Create custom types and routines dynamically from the precompiled library sort of a virtual machine (but not really) for you to drive. During the design stage of a program you create the program code piece by piece. The program is a tree structure that can serialize itself into the sequence of commands needed to create it. During design stage objects calculate their sizes, align to the right addresses for fast access, so even thou the program is created element by element with significant overhead, when a program block is complete it can serialize into a continuous block of memory that can be created in memory and erased very quickly, taking all objects with. The design stage has certain overheads that do not exist in the run time version, for example, in the design stage doubly linked lists are used, stuff can be moved around, objects are size, type and identifier aware, but once you are done with that block of code it is serialized to a continuous memory block, waiting to be requested and all design stage excess is stripped away. When the program is being ran, the necessary block of code is loaded in memory. When object or function definitions are met, their prototypes are created in memory and pointers to their functionality and data are linked to the program flow. Finally, when all data is copied and linked, execution is initiated cascading down the program tree. So basically the only thing that needs compiling is the low level, base components. A pseudo "machine" code is used to assemble the higher user types and functions so theoretically, if the same components are compiled for a different platform, the user code will be portable. The big question is can this even be done and is it a good idea to try? How will not having static code affect performance when instead of linear code for the compiler to optimize we are driving the compiled "virtual machine" with instructions, relying only in the optimizations made to the base static code?
c++
c
interpreter
null
null
01/18/2012 20:46:56
not a real question
C / C++ without compiling, can it be done? Read on === My general idea is as follows: Create a set of pre-compiled basic routines for standard types, operators and so forth. Create custom types and routines dynamically from the precompiled library sort of a virtual machine (but not really) for you to drive. During the design stage of a program you create the program code piece by piece. The program is a tree structure that can serialize itself into the sequence of commands needed to create it. During design stage objects calculate their sizes, align to the right addresses for fast access, so even thou the program is created element by element with significant overhead, when a program block is complete it can serialize into a continuous block of memory that can be created in memory and erased very quickly, taking all objects with. The design stage has certain overheads that do not exist in the run time version, for example, in the design stage doubly linked lists are used, stuff can be moved around, objects are size, type and identifier aware, but once you are done with that block of code it is serialized to a continuous memory block, waiting to be requested and all design stage excess is stripped away. When the program is being ran, the necessary block of code is loaded in memory. When object or function definitions are met, their prototypes are created in memory and pointers to their functionality and data are linked to the program flow. Finally, when all data is copied and linked, execution is initiated cascading down the program tree. So basically the only thing that needs compiling is the low level, base components. A pseudo "machine" code is used to assemble the higher user types and functions so theoretically, if the same components are compiled for a different platform, the user code will be portable. The big question is can this even be done and is it a good idea to try? How will not having static code affect performance when instead of linear code for the compiler to optimize we are driving the compiled "virtual machine" with instructions, relying only in the optimizations made to the base static code?
1
4,782,843
01/24/2011 14:01:21
336,040
05/08/2010 07:10:19
348
67
ACUNETIX - Login page password-guessing attack - brute force attack and Account Lockout
Can any one please let me know about the term "`Account Lockout`"? and how do i implement it on PHP. The below information i got from one of the web site security/audit tool called "`ACUNETIX`". **Description** "A common threat web developers face is a password-guessing attack known as a `brute force attack`. A brute force attack is an attempt to discover a password by systematically trying every possible combination of letters, numbers and symbols until you discover the one correct combination that works. This login page does not have any protection against password-guessing attacks(brute force attack). Consult Web references for more information about fixing this problem. **Impact** An attacker may attempt to discover a week password by systematically trying every possible combination of letters, numbers and symbols until it discovers the one correct combination that works. **Recommendation** It's recommended to implement some type of `account lockout` after a defined number of incorrect password attempts."
php
web-security
null
null
null
null
open
ACUNETIX - Login page password-guessing attack - brute force attack and Account Lockout === Can any one please let me know about the term "`Account Lockout`"? and how do i implement it on PHP. The below information i got from one of the web site security/audit tool called "`ACUNETIX`". **Description** "A common threat web developers face is a password-guessing attack known as a `brute force attack`. A brute force attack is an attempt to discover a password by systematically trying every possible combination of letters, numbers and symbols until you discover the one correct combination that works. This login page does not have any protection against password-guessing attacks(brute force attack). Consult Web references for more information about fixing this problem. **Impact** An attacker may attempt to discover a week password by systematically trying every possible combination of letters, numbers and symbols until it discovers the one correct combination that works. **Recommendation** It's recommended to implement some type of `account lockout` after a defined number of incorrect password attempts."
0
7,526,276
09/23/2011 08:33:21
912,316
08/25/2011 14:26:31
1
0
php script downloads after form submission instead of execution
The site have a form where pdf is uploaded and form is submitted. For small pdf file size 345KB. it works fine. But for large pdf size the php script ids downloaded instead of execution. I have chnaged the .htaccess as per below for large file support. But for large files same happens. .htaccess - php_value upload_max_filesize 32M php_value post_max_size 32M php_value max_execution_time 3600 php_value max_input_time 3600 php_value memory_limit 32M Any help will be appreciated Thanks in advance Mangesh
php
pdf
filesize
null
null
null
open
php script downloads after form submission instead of execution === The site have a form where pdf is uploaded and form is submitted. For small pdf file size 345KB. it works fine. But for large pdf size the php script ids downloaded instead of execution. I have chnaged the .htaccess as per below for large file support. But for large files same happens. .htaccess - php_value upload_max_filesize 32M php_value post_max_size 32M php_value max_execution_time 3600 php_value max_input_time 3600 php_value memory_limit 32M Any help will be appreciated Thanks in advance Mangesh
0
8,927,192
01/19/2012 13:51:40
651,701
03/09/2011 14:16:01
409
41
How to Send MMS Pro-grammatically without using Intent.ACTION_SEND
I have gone to various blog and tutorial`(http://stackoverflow.com/questions/2972845/how-to-send-image-via-mms-in-android)` and unable to get solution. I want the solution to send Image with SMS (i.e MMS) pro grammatically without using Intent. There is no documentation in this regard.Please suggest an alternative to do that without ACTION_SEND.
android
null
null
null
null
null
open
How to Send MMS Pro-grammatically without using Intent.ACTION_SEND === I have gone to various blog and tutorial`(http://stackoverflow.com/questions/2972845/how-to-send-image-via-mms-in-android)` and unable to get solution. I want the solution to send Image with SMS (i.e MMS) pro grammatically without using Intent. There is no documentation in this regard.Please suggest an alternative to do that without ACTION_SEND.
0
9,055,094
01/29/2012 17:21:50
957,981
09/21/2011 22:42:31
27
0
How can I change my php server settings so that writing $x[y] == $x['y']?
As said in the title: How can I change my php server settings so that writing $x[y] == $x['y']?
php
variables
settings
null
null
01/30/2012 12:29:49
too localized
How can I change my php server settings so that writing $x[y] == $x['y']? === As said in the title: How can I change my php server settings so that writing $x[y] == $x['y']?
3
7,656,876
10/05/2011 05:00:49
513,413
11/19/2010 11:31:30
344
4
Android, Designing custom Button (gradient and animation)
In my application I want to apply gradient to Button. I have written following code and the result is perfect. <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape> <padding android:left="1dp" android:top="1dp" android:right="1dp" android:bottom="1dp"/> <solid android:color="#FF000000"/> </shape> </item> <item> <shape> <padding android:left="5dp" android:top="5dp" android:right="5dp" android:bottom="5dp"/> <gradient android:startColor="#FFB0B0B0" android:centerColor="#FFFFFFFF" android:endColor="#FFB0B0B0" android:angle="315"/> <corners android:radius="3dp"/> </shape> </item> </layer-list> But my problem is, when I click on this button I have no effect or animation such as original one. Therefor, I want to add some effect on it that when user clicks on it the button becomes bigger and when released the key, the button comeback to its situation. guide me please. thanks :)
android
button
effect
null
null
null
open
Android, Designing custom Button (gradient and animation) === In my application I want to apply gradient to Button. I have written following code and the result is perfect. <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape> <padding android:left="1dp" android:top="1dp" android:right="1dp" android:bottom="1dp"/> <solid android:color="#FF000000"/> </shape> </item> <item> <shape> <padding android:left="5dp" android:top="5dp" android:right="5dp" android:bottom="5dp"/> <gradient android:startColor="#FFB0B0B0" android:centerColor="#FFFFFFFF" android:endColor="#FFB0B0B0" android:angle="315"/> <corners android:radius="3dp"/> </shape> </item> </layer-list> But my problem is, when I click on this button I have no effect or animation such as original one. Therefor, I want to add some effect on it that when user clicks on it the button becomes bigger and when released the key, the button comeback to its situation. guide me please. thanks :)
0
8,857,494
01/13/2012 21:29:49
1,148,529
01/13/2012 21:16:52
1
0
fancybox with button helper and Thumbnail helper
hoy i added fancybox to my website but<br> how can i add fancybox with the button helper and thumbnail helper. <br> and is it possible for the buttons(button helper) to be put under the image<br> so that i can watch en select which i want to see. <br> (i love fancybox) the buttons $(document).ready(function() { $(".fancybox-button").fancybox({ prevEffect : 'none', nextEffect : 'none', closeBtn : false, helpers : { title : { type : 'inside' }, buttons : {} } }); }); and the thumbnail code $(document).ready(function() { $(".fancybox-thumb").fancybox({ prevEffect : 'none', nextEffect : 'none', helpers : { title : { type: 'outside' }, overlay : { opacity : 0.8, css : { 'background-color' : '#000' } }, thumbs : { width : 50, height : 50 } } }); }); <br> i am a bit new with javascript i couldn't get it to work<br> what i am trying to do is mix them together and put the buttons on the bottom thanks in advanced ps can i also uses fancybox thumbnail helper to work with Youtube videos
button
fancybox
thumbnail
helper
null
null
open
fancybox with button helper and Thumbnail helper === hoy i added fancybox to my website but<br> how can i add fancybox with the button helper and thumbnail helper. <br> and is it possible for the buttons(button helper) to be put under the image<br> so that i can watch en select which i want to see. <br> (i love fancybox) the buttons $(document).ready(function() { $(".fancybox-button").fancybox({ prevEffect : 'none', nextEffect : 'none', closeBtn : false, helpers : { title : { type : 'inside' }, buttons : {} } }); }); and the thumbnail code $(document).ready(function() { $(".fancybox-thumb").fancybox({ prevEffect : 'none', nextEffect : 'none', helpers : { title : { type: 'outside' }, overlay : { opacity : 0.8, css : { 'background-color' : '#000' } }, thumbs : { width : 50, height : 50 } } }); }); <br> i am a bit new with javascript i couldn't get it to work<br> what i am trying to do is mix them together and put the buttons on the bottom thanks in advanced ps can i also uses fancybox thumbnail helper to work with Youtube videos
0
11,651,127
07/25/2012 13:42:45
1,312,478
04/04/2012 09:40:22
140
10
Alexa Sites Linking In
I read on internet that alexa updates its "Sites Linking In" only once in a month ( though ranking is updated daily as I monitor it daily ). Is that true ? Are there any webmasters here who track "sites linking in" and can they tell me when did they updated "sites linking in" ?
alexa
null
null
null
null
07/25/2012 14:00:13
off topic
Alexa Sites Linking In === I read on internet that alexa updates its "Sites Linking In" only once in a month ( though ranking is updated daily as I monitor it daily ). Is that true ? Are there any webmasters here who track "sites linking in" and can they tell me when did they updated "sites linking in" ?
2
5,916,059
05/06/2011 19:21:18
742,356
05/06/2011 19:21:18
1
0
Using Application Pages for List Forms
I'd like to use an application page that I created in the _layouts folder as the new document form for a document library in SharePoint. When I attempt to do this in SharePoint Designer, I have to browse to the file but it doesn't let me browse to the _layouts folder. This functionality will be list specific so is there a way to make this connection on a per-list basis? My only idea right now is to use a redirect page.
sharepoint2007
sharepoint-designer
sharepointdocumentlibrary
null
null
null
open
Using Application Pages for List Forms === I'd like to use an application page that I created in the _layouts folder as the new document form for a document library in SharePoint. When I attempt to do this in SharePoint Designer, I have to browse to the file but it doesn't let me browse to the _layouts folder. This functionality will be list specific so is there a way to make this connection on a per-list basis? My only idea right now is to use a redirect page.
0
8,893,481
01/17/2012 11:01:19
1,006,721
10/21/2011 08:37:53
3
0
Android - Adding advertisment to my app
I am new to app development and am nearing the completion of my first app. However, I would like to implement some advertisement into my application and have a few question regarding it: 1 - What is the best ads to use? I have read AbMob and AdSense are very good. 2 - Can someone point me towards a good tutorial which explains how I can add these ads to my app (AbMob, AbSense or other) from start to finish 3 - What kind of payments can i expect from 1000 impression, my research indicated about $1 (also are click rates much higher)? 4 - Finally, in your opinion do you feel its better to release for free, 59p or both? Thanks in advance
java
android
advertising
mobile-development
advertisement
01/18/2012 03:06:16
off topic
Android - Adding advertisment to my app === I am new to app development and am nearing the completion of my first app. However, I would like to implement some advertisement into my application and have a few question regarding it: 1 - What is the best ads to use? I have read AbMob and AdSense are very good. 2 - Can someone point me towards a good tutorial which explains how I can add these ads to my app (AbMob, AbSense or other) from start to finish 3 - What kind of payments can i expect from 1000 impression, my research indicated about $1 (also are click rates much higher)? 4 - Finally, in your opinion do you feel its better to release for free, 59p or both? Thanks in advance
2
5,011,620
02/16/2011 01:33:51
618,886
02/16/2011 01:32:35
1
0
What is the correct way to use NSURLConnection return data?
What is the difference between the following two code snippets? When I use the first snippet, the requests goes through but data holds 0 bytes, where as in the second case I do get the data. I know the second snippet works but why? I am using synchronous call here. This one returns 0 bytes of data... NSData *data = [NSURLConnection sendSynchronousRequest:theRequest returningResponse:&response error:&error]; This one returns correct data... NSData *data ; data = [NSURLConnection sendSynchronousRequest:theRequest returningResponse:&response error:&error];
objective-c
nsurlconnection
nsdata
null
null
null
open
What is the correct way to use NSURLConnection return data? === What is the difference between the following two code snippets? When I use the first snippet, the requests goes through but data holds 0 bytes, where as in the second case I do get the data. I know the second snippet works but why? I am using synchronous call here. This one returns 0 bytes of data... NSData *data = [NSURLConnection sendSynchronousRequest:theRequest returningResponse:&response error:&error]; This one returns correct data... NSData *data ; data = [NSURLConnection sendSynchronousRequest:theRequest returningResponse:&response error:&error];
0
4,605,823
01/05/2011 15:29:30
2,191
08/20/2008 20:39:36
1,588
32
Why does my sql date comparison return 0 results
I apologize in advance if this question is too long but I wanted to make sure I included all the steps I followed to get to this point. I have the follwing table in my MSSQL 2008 database: CREATE TABLE [VSPRRecalc]( [VSPRDate] [datetimeoffset](7) NOT NULL, [CalcType] [int] NOT NULL, CONSTRAINT [PK_VSPRRecalc] PRIMARY KEY CLUSTERED ( [VSPRDate] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] It has some rows in it that look like this: INSERT [vsprrecalc](VSPRDate,CalcType) VALUES('2010-12-15 10:17:49.5780000 -05:00','3') INSERT [vsprrecalc](VSPRDate,CalcType) VALUES('2010-12-16 07:44:03.3750000 -05:00','1') INSERT [vsprrecalc](VSPRDate,CalcType) VALUES('2010-12-17 07:40:40.1090000 -05:00','1') INSERT [vsprrecalc](VSPRDate,CalcType) VALUES('2010-12-18 16:29:02.2203744 -05:00','2') INSERT [vsprrecalc](VSPRDate,CalcType) VALUES('2010-12-20 09:58:50.1250000 -05:00','1') INSERT [vsprrecalc](VSPRDate,CalcType) VALUES('2010-12-29 19:21:26.8120000 -05:00','1') I'm using linq to check and see if a given date already exists in this table: var recalc = (from re in VSPRRecalcs where re.VSPRDate.Date == oDate.Value.Date select re).SingleOrDefault(); Currently `recalc` returns null whenever the date is within 5 hours of midnight (like the 12-29 case in the insert statements above). I checked and the following sql is being executed: exec sp_executesql N'SELECT [t0].[VSPRDate], [t0].[CalcType] FROM [dbo].[VSPRRecalc] AS [t0] WHERE [VSPRDate] =''2010-12-29 19:21:26.8120000 -05:00'' and CONVERT(DATE, [t0].[VSPRDate]) = @p0',N'@p0 datetime',@p0='2010-12-29' Which returns 0 records. I modified the query to make the test easier to play with and came up with the following: declare @t as date set @t = '2010-12-29' select *, case when CONVERT(DATE, [VSPRDate]) = @t then 'true' else 'false' end from VSPRRecalc where CONVERT(DATE, [VSPRDate]) = @t That query works for any other date in the table but not for any date that is within 5 hours of midnight (again see 12-29 above). If I run the above query without the where clause the 12-29 row does have 'true' displayed so clearly the boolean is evaluating the way I expect in the `select` statement but not in the `where` clause. Why does that happen?
sql
linq-to-sql
sql-server-2008
null
null
null
open
Why does my sql date comparison return 0 results === I apologize in advance if this question is too long but I wanted to make sure I included all the steps I followed to get to this point. I have the follwing table in my MSSQL 2008 database: CREATE TABLE [VSPRRecalc]( [VSPRDate] [datetimeoffset](7) NOT NULL, [CalcType] [int] NOT NULL, CONSTRAINT [PK_VSPRRecalc] PRIMARY KEY CLUSTERED ( [VSPRDate] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] It has some rows in it that look like this: INSERT [vsprrecalc](VSPRDate,CalcType) VALUES('2010-12-15 10:17:49.5780000 -05:00','3') INSERT [vsprrecalc](VSPRDate,CalcType) VALUES('2010-12-16 07:44:03.3750000 -05:00','1') INSERT [vsprrecalc](VSPRDate,CalcType) VALUES('2010-12-17 07:40:40.1090000 -05:00','1') INSERT [vsprrecalc](VSPRDate,CalcType) VALUES('2010-12-18 16:29:02.2203744 -05:00','2') INSERT [vsprrecalc](VSPRDate,CalcType) VALUES('2010-12-20 09:58:50.1250000 -05:00','1') INSERT [vsprrecalc](VSPRDate,CalcType) VALUES('2010-12-29 19:21:26.8120000 -05:00','1') I'm using linq to check and see if a given date already exists in this table: var recalc = (from re in VSPRRecalcs where re.VSPRDate.Date == oDate.Value.Date select re).SingleOrDefault(); Currently `recalc` returns null whenever the date is within 5 hours of midnight (like the 12-29 case in the insert statements above). I checked and the following sql is being executed: exec sp_executesql N'SELECT [t0].[VSPRDate], [t0].[CalcType] FROM [dbo].[VSPRRecalc] AS [t0] WHERE [VSPRDate] =''2010-12-29 19:21:26.8120000 -05:00'' and CONVERT(DATE, [t0].[VSPRDate]) = @p0',N'@p0 datetime',@p0='2010-12-29' Which returns 0 records. I modified the query to make the test easier to play with and came up with the following: declare @t as date set @t = '2010-12-29' select *, case when CONVERT(DATE, [VSPRDate]) = @t then 'true' else 'false' end from VSPRRecalc where CONVERT(DATE, [VSPRDate]) = @t That query works for any other date in the table but not for any date that is within 5 hours of midnight (again see 12-29 above). If I run the above query without the where clause the 12-29 row does have 'true' displayed so clearly the boolean is evaluating the way I expect in the `select` statement but not in the `where` clause. Why does that happen?
0
8,981,859
01/24/2012 04:03:05
1,131,419
01/05/2012 05:32:52
6
0
How to see Linux built-in modules running? Any command corresponding to lsmod?
I know Linux kernel modules can be checked by lsmod. But is there any command like this for built-in modules? I would like to know if a built-in module is really running or not. (ex. built-in watchdog module)
linux
module
command
kernel
null
01/24/2012 07:37:09
off topic
How to see Linux built-in modules running? Any command corresponding to lsmod? === I know Linux kernel modules can be checked by lsmod. But is there any command like this for built-in modules? I would like to know if a built-in module is really running or not. (ex. built-in watchdog module)
2
8,693,532
01/01/2012 14:20:21
658,031
03/13/2011 23:52:31
1,078
25
Best way for comparing string arrays (Custom command line commands)
In my application I am making a custom command line. I am looking for the best way to check user entered commands and argument agains the arguments I have defined. Take the following example command (which works if user enter it right and in order) do>Drawer /X:Time /Y:Current /N:Window NAme /D:Description Now I want to have a method to does the checking for me: private string CheckDrawerArgs(string[] args) { var mustExist = new string[4]{"X:", "Y:", "N:", "D:"}; if(args.Length != mustExist.Length) { return "Arguments are not completly defined. use 'Drawer /?' for help."; } var argsAreRight = false; var flat = from s1 in args from s2 in mustExist where s1.StartsWith(s2) //how to check if all elements provided in args does look like (Starts with) elements in mustExist ; if(argsAreRight == false) { return "Bad arguments"; } //Proceed with rest... } So what I am looking for, is to check if required arguments which are provided by user, are in the `args` also they are not duplicated while the order of them would not effect the checking... Looking forward for tips!
c#
arrays
string
linq
compare
null
open
Best way for comparing string arrays (Custom command line commands) === In my application I am making a custom command line. I am looking for the best way to check user entered commands and argument agains the arguments I have defined. Take the following example command (which works if user enter it right and in order) do>Drawer /X:Time /Y:Current /N:Window NAme /D:Description Now I want to have a method to does the checking for me: private string CheckDrawerArgs(string[] args) { var mustExist = new string[4]{"X:", "Y:", "N:", "D:"}; if(args.Length != mustExist.Length) { return "Arguments are not completly defined. use 'Drawer /?' for help."; } var argsAreRight = false; var flat = from s1 in args from s2 in mustExist where s1.StartsWith(s2) //how to check if all elements provided in args does look like (Starts with) elements in mustExist ; if(argsAreRight == false) { return "Bad arguments"; } //Proceed with rest... } So what I am looking for, is to check if required arguments which are provided by user, are in the `args` also they are not duplicated while the order of them would not effect the checking... Looking forward for tips!
0
10,424,903
05/03/2012 03:59:14
42,595
12/02/2008 19:47:03
6,678
85
How can I dynamically declare these instance methods?
I had to implement these methods on an ActiveRecord model in order to support some desired view functionality. I'm thinking there has to be a more compact way to declare these methods, probably involving an Array of symbols and an `Array#each` call. Any suggestions? (These are legacy column names, BTW.) --- class Contract < ActiveRecord::Base def start_date_displayed self.start_date.present? ? self.start_date.strftime("%-m/%-d/%Y") : '' end def start_date_displayed=(input) if input.present? self.start_date = Date.strptime input, '%m/%d/%Y' end end def end_date_displayed self.end_date.present? ? self.end_date.strftime("%-m/%-d/%Y") : '' end def end_date_displayed=(input) if input.present? self.end_date = Date.strptime input, '%m/%d/%Y' end end def ArrivalDate_displayed self.ArrivalDate.present? ? self.ArrivalDate.strftime("%-m/%-d/%Y") : '' end def ArrivalDate_displayed=(input) if input.present? self.ArrivalDate = Date.strptime input, '%m/%d/%Y' end end def Contract_ReceivedDate_displayed self.Contract_ReceivedDate.present? ? self.Contract_ReceivedDate.strftime("%-m/%-d/%Y") : '' end def Contract_ReceivedDate_displayed=(input) if input.present? self.Contract_ReceivedDate = Date.strptime input, '%m/%d/%Y' end end def Contract_FinalizedDate_displayed self.Contract_FinalizedDate.present? ? self.Contract_FinalizedDate.strftime("%-m/%-d/%Y") : '' end def Contract_FinalizedDate_displayed=(input) if input.present? self.Contract_FinalizedDate = Date.strptime input, '%m/%d/%Y' end end def Committee_Date_displayed self.Committee_Date.present? ? self.Committee_Date.strftime("%-m/%-d/%Y") : '' end def Committee_Date_displayed=(input) if input.present? self.Committee_Date = Date.strptime input, '%m/%d/%Y' end end # ... end
ruby-on-rails
ruby
metaprogramming
null
null
null
open
How can I dynamically declare these instance methods? === I had to implement these methods on an ActiveRecord model in order to support some desired view functionality. I'm thinking there has to be a more compact way to declare these methods, probably involving an Array of symbols and an `Array#each` call. Any suggestions? (These are legacy column names, BTW.) --- class Contract < ActiveRecord::Base def start_date_displayed self.start_date.present? ? self.start_date.strftime("%-m/%-d/%Y") : '' end def start_date_displayed=(input) if input.present? self.start_date = Date.strptime input, '%m/%d/%Y' end end def end_date_displayed self.end_date.present? ? self.end_date.strftime("%-m/%-d/%Y") : '' end def end_date_displayed=(input) if input.present? self.end_date = Date.strptime input, '%m/%d/%Y' end end def ArrivalDate_displayed self.ArrivalDate.present? ? self.ArrivalDate.strftime("%-m/%-d/%Y") : '' end def ArrivalDate_displayed=(input) if input.present? self.ArrivalDate = Date.strptime input, '%m/%d/%Y' end end def Contract_ReceivedDate_displayed self.Contract_ReceivedDate.present? ? self.Contract_ReceivedDate.strftime("%-m/%-d/%Y") : '' end def Contract_ReceivedDate_displayed=(input) if input.present? self.Contract_ReceivedDate = Date.strptime input, '%m/%d/%Y' end end def Contract_FinalizedDate_displayed self.Contract_FinalizedDate.present? ? self.Contract_FinalizedDate.strftime("%-m/%-d/%Y") : '' end def Contract_FinalizedDate_displayed=(input) if input.present? self.Contract_FinalizedDate = Date.strptime input, '%m/%d/%Y' end end def Committee_Date_displayed self.Committee_Date.present? ? self.Committee_Date.strftime("%-m/%-d/%Y") : '' end def Committee_Date_displayed=(input) if input.present? self.Committee_Date = Date.strptime input, '%m/%d/%Y' end end # ... end
0
11,247,862
06/28/2012 15:24:56
1,485,713
06/27/2012 12:57:55
1
0
Action Spec Preview Tool
We are testing the preview tool and preview API for action_spec and we have any doubt. If we test with like we receive data: https://developers.facebook.com/tools/action_spec_preview?feed_selector&action_spec=%7B%27action.type%27%3A%27like%27%2C+%27post%27%3A%27454387257918625%27%7D but if we test with comment, we receive zeros: https://developers.facebook.com/tools/action_spec_preview?feed_selector&action_spec=%7B%27action.type%27%3A%27comment%27%2C+%27post%27%3A%27454387257918625%27%7D Post have recent comments and it should be data Thanks!
facebook
api
ads
null
null
06/30/2012 13:23:38
not a real question
Action Spec Preview Tool === We are testing the preview tool and preview API for action_spec and we have any doubt. If we test with like we receive data: https://developers.facebook.com/tools/action_spec_preview?feed_selector&action_spec=%7B%27action.type%27%3A%27like%27%2C+%27post%27%3A%27454387257918625%27%7D but if we test with comment, we receive zeros: https://developers.facebook.com/tools/action_spec_preview?feed_selector&action_spec=%7B%27action.type%27%3A%27comment%27%2C+%27post%27%3A%27454387257918625%27%7D Post have recent comments and it should be data Thanks!
1
9,814,724
03/22/2012 00:13:32
1,226,041
02/22/2012 14:08:59
5
0
segue from allertview
I'm stuck wringing to change the view by a segue after the user presses a button in a uiallertview. This is what i have so far: - (void)viewDidLoad { [bericht setEditable:NO]; [bericht setUserInteractionEnabled:NO]; [super viewDidLoad]; Reachability *r = [Reachability reachabilityWithHostName:@"www.google.com"]; NetworkStatus internetStatus = [r currentReachabilityStatus]; if ((internetStatus == ReachableViaWiFi) || (internetStatus == ReachableViaWWAN)){ dispatch_async(kBgQueue, ^{ NSData* data = [NSData dataWithContentsOfURL:kJsonURL]; [self performSelectorOnMainThread:@selector(fetchedData:) withObject:data waitUntilDone:YES]; }); } else { UIAlertView *geenInternet = [[UIAlertView alloc] initWithTitle:@"Geen Internet" message:@"Voor het gebruik van deze app is een internet verbinding nodig. Momenteel bent u niet verbonden met het internet. Probeer het later nog eens." delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil]; [geenInternet show]; } } -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ if (buttonIndex == 0) { [self preformSegueWithIdentifier:@"geenInternetSegue" sender:self]; } else { NSLog(@"Dafaqu?"); } } The `[self preformSegueWithIdentifier:@"geenInternetSegue" sender:self];` part doesn't work. anny toughts on how i can fix this? Tnx
xcode
ios5
storyboard
segue
null
04/30/2012 16:07:49
too localized
segue from allertview === I'm stuck wringing to change the view by a segue after the user presses a button in a uiallertview. This is what i have so far: - (void)viewDidLoad { [bericht setEditable:NO]; [bericht setUserInteractionEnabled:NO]; [super viewDidLoad]; Reachability *r = [Reachability reachabilityWithHostName:@"www.google.com"]; NetworkStatus internetStatus = [r currentReachabilityStatus]; if ((internetStatus == ReachableViaWiFi) || (internetStatus == ReachableViaWWAN)){ dispatch_async(kBgQueue, ^{ NSData* data = [NSData dataWithContentsOfURL:kJsonURL]; [self performSelectorOnMainThread:@selector(fetchedData:) withObject:data waitUntilDone:YES]; }); } else { UIAlertView *geenInternet = [[UIAlertView alloc] initWithTitle:@"Geen Internet" message:@"Voor het gebruik van deze app is een internet verbinding nodig. Momenteel bent u niet verbonden met het internet. Probeer het later nog eens." delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil]; [geenInternet show]; } } -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ if (buttonIndex == 0) { [self preformSegueWithIdentifier:@"geenInternetSegue" sender:self]; } else { NSLog(@"Dafaqu?"); } } The `[self preformSegueWithIdentifier:@"geenInternetSegue" sender:self];` part doesn't work. anny toughts on how i can fix this? Tnx
3
10,376,703
04/29/2012 22:49:56
1,364,751
04/29/2012 22:34:36
1
0
Cache Memory Confusion
Can CPU Cache still be utilized for memory use by the programmer while it is operating in the UC mode? Or is this impossible because the programmer is unable to address Cache memory? I mistakenly thought MTRR's could be used to address CPU Cache memory?
database
null
null
null
null
null
open
Cache Memory Confusion === Can CPU Cache still be utilized for memory use by the programmer while it is operating in the UC mode? Or is this impossible because the programmer is unable to address Cache memory? I mistakenly thought MTRR's could be used to address CPU Cache memory?
0
11,061,385
06/16/2012 06:32:36
8,664
09/15/2008 16:33:50
458
18
ASP.NET MVC3 Dynamic Navigation
I'm working on a ASP.NET MVC3 web application and I want to create a navigation menu that has a sub menu created dynamically from an object. For example I have a Library object/model that contains a list of Books. I want my Navigation to dynamically populate a link to each of those books and display their titles. Ex: Home Book List - Book 1 - Book 2 - Book 3 About I have this working by passing the Library object through ViewData from my Controller. My shared _Layout.cshtml page then reads the ViewData and populates the navigation menu. However the downside to this solution is that every method that returns a view in my controllers has to place the Library object into the ViewData. So I'm wondering if there is a better or simpler way to do this? I'm sure it can be done with jQuery, but maybe you all have a better idea.
asp.net-mvc-3
null
null
null
null
null
open
ASP.NET MVC3 Dynamic Navigation === I'm working on a ASP.NET MVC3 web application and I want to create a navigation menu that has a sub menu created dynamically from an object. For example I have a Library object/model that contains a list of Books. I want my Navigation to dynamically populate a link to each of those books and display their titles. Ex: Home Book List - Book 1 - Book 2 - Book 3 About I have this working by passing the Library object through ViewData from my Controller. My shared _Layout.cshtml page then reads the ViewData and populates the navigation menu. However the downside to this solution is that every method that returns a view in my controllers has to place the Library object into the ViewData. So I'm wondering if there is a better or simpler way to do this? I'm sure it can be done with jQuery, but maybe you all have a better idea.
0
2,689,990
04/22/2010 10:32:16
109,251
05/19/2009 08:56:17
418
45
jquery json storage for life of page
can anyone please point me in the right direction for a json database on the client side for the duration of the pages life. example: i have a page with a canvas that i can add elements to and move them around, but i wish to create a Json object so that if an item is added to the canvas, the details are also added or updated in the json. i use asp.net MVC C#. ideally a good example of add item and edit item and if possible using jquery but any kind of javascript would at least give me a clue. thanks
jquery
json
c#
null
null
null
open
jquery json storage for life of page === can anyone please point me in the right direction for a json database on the client side for the duration of the pages life. example: i have a page with a canvas that i can add elements to and move them around, but i wish to create a Json object so that if an item is added to the canvas, the details are also added or updated in the json. i use asp.net MVC C#. ideally a good example of add item and edit item and if possible using jquery but any kind of javascript would at least give me a clue. thanks
0
1,717,087
11/11/2009 18:12:29
109,941
05/20/2009 13:52:16
615
34
Looking for Inspiration: How can jQuery be truly useful?
- I read [jQuery in Action][1]. - I can grok the purpose and strengths of the jQuery Core API - Now I'd like to graduate from a jQuery novice to a jQuery professional. > Do any blogs or books detail how jQuery can be truly useful in production applications? - Essentially, I'm looking for jQuery inspiration. - How can jQuery make me more productive? In a nutshell: - I read 'jQuery in Action'. - Now what? [1]: http://www.amazon.com/jQuery-Action-Bear-Bibeault/dp/1933988355/ref=sr_1_1?ie=UTF8&s=books&qid=1257960304&sr=8-1 [2]: http://stackoverflow.com/questions/934500/most-useful-jquery-plugins [3]: http://stackoverflow.com/questions/1051432/any-clear-guidelines-and-best-practices-on-using-jquery-and-asp-net-mvc-together
jquery
books
inspiration
online-resources
productivity
10/27/2011 04:44:35
not constructive
Looking for Inspiration: How can jQuery be truly useful? === - I read [jQuery in Action][1]. - I can grok the purpose and strengths of the jQuery Core API - Now I'd like to graduate from a jQuery novice to a jQuery professional. > Do any blogs or books detail how jQuery can be truly useful in production applications? - Essentially, I'm looking for jQuery inspiration. - How can jQuery make me more productive? In a nutshell: - I read 'jQuery in Action'. - Now what? [1]: http://www.amazon.com/jQuery-Action-Bear-Bibeault/dp/1933988355/ref=sr_1_1?ie=UTF8&s=books&qid=1257960304&sr=8-1 [2]: http://stackoverflow.com/questions/934500/most-useful-jquery-plugins [3]: http://stackoverflow.com/questions/1051432/any-clear-guidelines-and-best-practices-on-using-jquery-and-asp-net-mvc-together
4
9,583,785
03/06/2012 12:32:55
1,252,171
03/06/2012 12:20:13
1
0
Jquery DIV count add class
Add class of test after div count Any help would be appreciated :-) $(function() { var coloumnCount = $("#plans-wrapper").children("div.column").length(); if(coloumnCount > 3 { $("column").addClass("test"); }); });
javascript
jquery
null
null
null
03/06/2012 19:03:38
too localized
Jquery DIV count add class === Add class of test after div count Any help would be appreciated :-) $(function() { var coloumnCount = $("#plans-wrapper").children("div.column").length(); if(coloumnCount > 3 { $("column").addClass("test"); }); });
3
5,855,124
05/02/2011 08:42:03
263,460
02/01/2010 11:12:34
66
13
C# unstandart projects, research papers, computer science and famous open source. Which to learn?
Hi i am looking for sites(cs news agregators etc), or intresting computer science projects with code in c#. Maybe stackoveflow guru's know one good. Or it is better just to learn programming practice from famous open source projects(like nhibernate) 2. Can you recommend ( parsers,business rule engines,linq expressions, data mining, pattern recognition,functional programming(c#) or another computer science projects with c# ) open source projects.
c#
functional-programming
computer-science
data-mining
pattern-recognition
05/02/2011 09:44:26
not a real question
C# unstandart projects, research papers, computer science and famous open source. Which to learn? === Hi i am looking for sites(cs news agregators etc), or intresting computer science projects with code in c#. Maybe stackoveflow guru's know one good. Or it is better just to learn programming practice from famous open source projects(like nhibernate) 2. Can you recommend ( parsers,business rule engines,linq expressions, data mining, pattern recognition,functional programming(c#) or another computer science projects with c# ) open source projects.
1
6,314,458
06/11/2011 06:20:28
793,732
06/11/2011 06:16:20
1
0
when this exception occurs?
com.mysql.jdbc.CommunicationsException: Communications link failure due to und lying exception: ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection timed out: connect STACKTRACE: java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0 (Native Method) at java.net.DualStackPlainSocketImpl.socketConnect (DualStackPlainSocke mpl.java:69) at java.net.AbstractPlainSocketImpl.doConnect (AbstractPlainSocketImpl. va:316) at java.net.AbstractPlainSocketImpl.connectToAddress (AbstractPlainSock Impl.java:177) at java.net.AbstractPlainSocketImpl.connect (AbstractPlainSocketImpl.ja :164) at java.net.PlainSocketImpl.connect (PlainSocketImpl.java:154) at java.net.SocksSocketImpl.connect (SocksSocketImpl.java:390) at java.net.Socket.connect(Socket.java:578) at java.net.Socket.connect(Socket.java:527) at java.net.Socket.<init>(Socket.java:424) at java.net.Socket.<init>(Socket.java:240) at com.mysql.jdbc.StandardSocketFactory.connect (StandardSocketFactory. va:173) at com.mysql.jdbc.MysqlIO.<init> (MysqlIO.java:268) at com.mysql.jdbc.Connection.createNewIO (Connection.java:2745) at com.mysql.jdbc.Connection.<init> (Connection.java:1553) at com.mysql.jdbc.NonRegisteringDriver.connect (NonRegisteringDriver.ja :285) at java.sql.DriverManager.getConnection (DriverManager.java:620) at java.sql.DriverManager.getConnection (DriverManager.java:200) at Database.Connectivity.<init> (Connectivity.java:48) at Form.SignIn.<init>(SignIn.java:64) at Form.SignIn$5.run(SignIn.java:389) at java.awt.event.InvocationEvent.dispatch (InvocationEvent.java:251) at java.awt.EventQueue.dispatchEvent (EventQueue.java:649) at java.awt.EventDispatchThread.pumpOneEventForFilters (EventDispatchTh ad.java:255) at java.awt.EventDispatchThread.pumpEventsForFilter (EventDispatchThrea java:170) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchTh ad.java:160) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:15 at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:14 at java.awt.EventDispatchThread.run (EventDispatchThread.java:136) ** END NESTED EXCEPTION ** Last packet sent to the server was 0 ms ago. at com.mysql.jdbc.Connection.createNewIO (Connection.java:2820) at com.mysql.jdbc.Connection.<init> (Connection.java:1553) at com.mysql.jdbc.NonRegisteringDriver.connect (NonRegisteringDriver.ja :285) at java.sql.DriverManager.getConnection (DriverManager.java:620) at java.sql.DriverManager.getConnection (DriverManager.java:200) at Database.Connectivity.<init> (Connectivity.java:48) at Form.SignIn.<init>(SignIn.java:64) at Form.SignIn$5.run(SignIn.java:389) at java.awt.event.InvocationEvent.dispatch (InvocationEvent.java:251) at java.awt.EventQueue.dispatchEvent (EventQueue.java:649) at java.awt.EventDispatchThread.pumpOneEventForFilters (EventDispatchTh ad.java:255) at java.awt.EventDispatchThread.pumpEventsForFilter (EventDispatchThrea java:170) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchTh ad.java:160) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:15 at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:14 at java.awt.EventDispatchThread.run (EventDispatchThread.java:136)
sockets
null
null
null
null
06/11/2011 10:06:43
not a real question
when this exception occurs? === com.mysql.jdbc.CommunicationsException: Communications link failure due to und lying exception: ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection timed out: connect STACKTRACE: java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0 (Native Method) at java.net.DualStackPlainSocketImpl.socketConnect (DualStackPlainSocke mpl.java:69) at java.net.AbstractPlainSocketImpl.doConnect (AbstractPlainSocketImpl. va:316) at java.net.AbstractPlainSocketImpl.connectToAddress (AbstractPlainSock Impl.java:177) at java.net.AbstractPlainSocketImpl.connect (AbstractPlainSocketImpl.ja :164) at java.net.PlainSocketImpl.connect (PlainSocketImpl.java:154) at java.net.SocksSocketImpl.connect (SocksSocketImpl.java:390) at java.net.Socket.connect(Socket.java:578) at java.net.Socket.connect(Socket.java:527) at java.net.Socket.<init>(Socket.java:424) at java.net.Socket.<init>(Socket.java:240) at com.mysql.jdbc.StandardSocketFactory.connect (StandardSocketFactory. va:173) at com.mysql.jdbc.MysqlIO.<init> (MysqlIO.java:268) at com.mysql.jdbc.Connection.createNewIO (Connection.java:2745) at com.mysql.jdbc.Connection.<init> (Connection.java:1553) at com.mysql.jdbc.NonRegisteringDriver.connect (NonRegisteringDriver.ja :285) at java.sql.DriverManager.getConnection (DriverManager.java:620) at java.sql.DriverManager.getConnection (DriverManager.java:200) at Database.Connectivity.<init> (Connectivity.java:48) at Form.SignIn.<init>(SignIn.java:64) at Form.SignIn$5.run(SignIn.java:389) at java.awt.event.InvocationEvent.dispatch (InvocationEvent.java:251) at java.awt.EventQueue.dispatchEvent (EventQueue.java:649) at java.awt.EventDispatchThread.pumpOneEventForFilters (EventDispatchTh ad.java:255) at java.awt.EventDispatchThread.pumpEventsForFilter (EventDispatchThrea java:170) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchTh ad.java:160) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:15 at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:14 at java.awt.EventDispatchThread.run (EventDispatchThread.java:136) ** END NESTED EXCEPTION ** Last packet sent to the server was 0 ms ago. at com.mysql.jdbc.Connection.createNewIO (Connection.java:2820) at com.mysql.jdbc.Connection.<init> (Connection.java:1553) at com.mysql.jdbc.NonRegisteringDriver.connect (NonRegisteringDriver.ja :285) at java.sql.DriverManager.getConnection (DriverManager.java:620) at java.sql.DriverManager.getConnection (DriverManager.java:200) at Database.Connectivity.<init> (Connectivity.java:48) at Form.SignIn.<init>(SignIn.java:64) at Form.SignIn$5.run(SignIn.java:389) at java.awt.event.InvocationEvent.dispatch (InvocationEvent.java:251) at java.awt.EventQueue.dispatchEvent (EventQueue.java:649) at java.awt.EventDispatchThread.pumpOneEventForFilters (EventDispatchTh ad.java:255) at java.awt.EventDispatchThread.pumpEventsForFilter (EventDispatchThrea java:170) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchTh ad.java:160) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:15 at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:14 at java.awt.EventDispatchThread.run (EventDispatchThread.java:136)
1
1,302,151
08/19/2009 19:28:40
57,847
01/22/2009 10:16:37
346
42
How to profile and understand output for a Java Web App
I am currently trying to profile a java web app. I used Netbeans Profiler in conjunction with Eclipse. My server (Tomcat) is running through eclipse plugin and I dynamically connect to server using Netbeans profiler. I have a primary problem, that after sometime server runs out of memory on an environment. I read about the memory leak and I realized that there are two ways: 1. Large objects sit in memory stay un collected and cause memory leak OR 2. small objects keep getting assigned in memory without being collected. Although second one is usually hard to find, one usual symptom is that over a period of time, the gerenerations surviving garbage collection would keep increasing, irrespective of speed. And it seems to happen in my web app, although no activity is really taking place. The generations increase over a period of time, steadily and without exception. Forcing me to think that I have some refrenced objects somewhere which should have been garbage collected. I ran the tests with profiler but unfortunately I don't really understand as to how to pin point the object. I noticed that one specific HASHMAP had surving generation count consistently increasing even though I garbage collected several times. I am attaching a simple screen shot giving a very brief overview of what I saw in next few min of starting application. I would be grateful if you could point me out to some real articles etc which would enlighten me as to how to make sense of profiling and what is it that I should go about doing to ensure I catch the culprit. Any help is much appreciated. Find the screenshot attached. ![alt text][1] [1]: http://dl.getdropbox.com/u/1264228/Files/State.png
java
profiling
netbeans
null
null
null
open
How to profile and understand output for a Java Web App === I am currently trying to profile a java web app. I used Netbeans Profiler in conjunction with Eclipse. My server (Tomcat) is running through eclipse plugin and I dynamically connect to server using Netbeans profiler. I have a primary problem, that after sometime server runs out of memory on an environment. I read about the memory leak and I realized that there are two ways: 1. Large objects sit in memory stay un collected and cause memory leak OR 2. small objects keep getting assigned in memory without being collected. Although second one is usually hard to find, one usual symptom is that over a period of time, the gerenerations surviving garbage collection would keep increasing, irrespective of speed. And it seems to happen in my web app, although no activity is really taking place. The generations increase over a period of time, steadily and without exception. Forcing me to think that I have some refrenced objects somewhere which should have been garbage collected. I ran the tests with profiler but unfortunately I don't really understand as to how to pin point the object. I noticed that one specific HASHMAP had surving generation count consistently increasing even though I garbage collected several times. I am attaching a simple screen shot giving a very brief overview of what I saw in next few min of starting application. I would be grateful if you could point me out to some real articles etc which would enlighten me as to how to make sense of profiling and what is it that I should go about doing to ensure I catch the culprit. Any help is much appreciated. Find the screenshot attached. ![alt text][1] [1]: http://dl.getdropbox.com/u/1264228/Files/State.png
0
7,679,978
10/06/2011 20:18:46
623,810
02/18/2011 21:26:08
19
0
Coding in Python
What is equivalent code in Python for this C++ code: int T , i , a , b ; scanf( "%d" , &T ) ; for( i = 1 ; i <= T ; i++ ) { scanf( "%d %d" , &a , &b ) ; printf( "Case %d : %d\n " , i , a + b ) ; }
c++
python
null
null
null
10/06/2011 20:26:15
not a real question
Coding in Python === What is equivalent code in Python for this C++ code: int T , i , a , b ; scanf( "%d" , &T ) ; for( i = 1 ; i <= T ; i++ ) { scanf( "%d %d" , &a , &b ) ; printf( "Case %d : %d\n " , i , a + b ) ; }
1
3,526,176
08/19/2010 20:56:51
282,706
02/27/2010 14:40:21
1,974
117
Drupal allow FULL html as input format
I have a specific kind of node in which the user must paste FULL html into the body field. E.g. html including the html, head and body tags. Apparently, Drupal's version of "full html" is infact not "full html" as it strips out these tags. How can I circumvent Drupal?
php
html
drupal
null
null
null
open
Drupal allow FULL html as input format === I have a specific kind of node in which the user must paste FULL html into the body field. E.g. html including the html, head and body tags. Apparently, Drupal's version of "full html" is infact not "full html" as it strips out these tags. How can I circumvent Drupal?
0
11,616,382
07/23/2012 16:14:15
1,122,828
12/30/2011 11:20:06
101
5
Which is better for scalability multiple database or NoSql?
For an existing web application built on using Oracle database, what are the choices available in order to scale horizontally. Few thoughts are: 1. Have multiple databases and multiple application servers each connecting to a different database and a controller application with his own database whose role will be to decide which request to send to which server. Challenges involve moving existing data from one database to another as and when required in order to evenly distribute the load on multiple databases. Also keeping all the common data on all the database in sync with the controller database. 2. Move to NoSql 3. Any other? Please suggest.
database
oracle
web-applications
nosql
scalability
07/23/2012 20:32:17
off topic
Which is better for scalability multiple database or NoSql? === For an existing web application built on using Oracle database, what are the choices available in order to scale horizontally. Few thoughts are: 1. Have multiple databases and multiple application servers each connecting to a different database and a controller application with his own database whose role will be to decide which request to send to which server. Challenges involve moving existing data from one database to another as and when required in order to evenly distribute the load on multiple databases. Also keeping all the common data on all the database in sync with the controller database. 2. Move to NoSql 3. Any other? Please suggest.
2
7,060,677
08/15/2011 00:22:18
894,347
08/15/2011 00:22:18
1
0
[C#]Im 15(soon 16) been programming since i was 12.. problem, help?
Well guys. Like the title said. Ive been programming since I was 12, been taking lots of breaks and stuff. But. Now I'm starting highschool (22nd august) and I haven't learned to code yet! I have this weird thing that, like I know what stuff does in programming (variables and that) But, when my friends give me some challenges to do, I give up immediately. I have no idea what to use to build my program and such.. Right now I dont know what to code to test myself.. I cant really explain it. But I cant program, eventho i know what stuff does. Have I just like confused myself? Could I get some assignments from you guys and tell u where I get stuck? I really want to be one of the best programmers in my class when I start.. If I get a hang of it, i think all my programming skills will step up (4 years of programming..) Does this sound familiar to anyone of you? I really need to get this problem sorted.. I want to code right now, i have a passion for it, but I dont know what to program.. If you didnt understand, tell me, I'll try to explain more.
c#
null
null
null
null
08/15/2011 00:26:47
off topic
[C#]Im 15(soon 16) been programming since i was 12.. problem, help? === Well guys. Like the title said. Ive been programming since I was 12, been taking lots of breaks and stuff. But. Now I'm starting highschool (22nd august) and I haven't learned to code yet! I have this weird thing that, like I know what stuff does in programming (variables and that) But, when my friends give me some challenges to do, I give up immediately. I have no idea what to use to build my program and such.. Right now I dont know what to code to test myself.. I cant really explain it. But I cant program, eventho i know what stuff does. Have I just like confused myself? Could I get some assignments from you guys and tell u where I get stuck? I really want to be one of the best programmers in my class when I start.. If I get a hang of it, i think all my programming skills will step up (4 years of programming..) Does this sound familiar to anyone of you? I really need to get this problem sorted.. I want to code right now, i have a passion for it, but I dont know what to program.. If you didnt understand, tell me, I'll try to explain more.
2
4,380,184
12/07/2010 18:26:04
452,902
09/20/2010 15:49:08
115
20
Programmer VS Commercial Systems
My question here is relative a jobs for programmers. Why does employer still contracting programmers if today we have a lot of good commercial system avaliable on the market? Maybe this question look a little bit useless, but right now I'm working and this doubt arose to me and my boss. I have a few answers to my own question, but I really would like to speculate this subject a bit more. Any answer will make me feel better. Thanks.
self-employed
null
null
null
null
12/07/2010 18:33:47
not constructive
Programmer VS Commercial Systems === My question here is relative a jobs for programmers. Why does employer still contracting programmers if today we have a lot of good commercial system avaliable on the market? Maybe this question look a little bit useless, but right now I'm working and this doubt arose to me and my boss. I have a few answers to my own question, but I really would like to speculate this subject a bit more. Any answer will make me feel better. Thanks.
4
8,035,378
11/07/2011 10:47:55
1,023,576
11/01/2011 11:31:02
1
0
Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag
This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]
struts2
null
null
null
null
11/09/2011 01:11:39
not a real question
Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag === This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]
1
9,024,817
01/26/2012 20:25:26
1,172,134
01/26/2012 20:07:09
1
0
Excel has stopped working error when closing excel with VB Editor Open
**System: Office 10 32 bit SP1 running on Windows 7 64 bit.** This is a pretty clean install as the machine was only built two weeks ago. However I do also have Office XP (really) installed on this system. Whenever I close Excel when the VB Editor window is open, I get the error message "Microsoft Excel has stopped working A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available." I do not have another instance of either version of Excel running - at the moment the only programs that I have started are Firefox (to write this) and Outlook. I have tried this opening Excel normally and in safe mode (ie with no addins installed). This happens even if I have done nothing but open excel, open the VBE then close excel. It seems that I have exactly the same issue doing this in Excel 2010 and Excel XP. I have tried to repair the installation of Office 2010 but that has not made any difference. Looking in the Systems log (Control Panel, Admin Tools, Event Viewer, Windows Logs, Application) there are a list of various level events. The ones that relate to excel failing to close are an error level and an information level shown below. If anyone has any brilliant ideas how to fix this - or how to get Microsoft to look into it I would be extremely grateful. **The Error one is as follows: Event 1000 Application Error** **General Tab:** Faulting application name: EXCEL.EXE, version: 14.0.6112.5000, time stamp: 0x4e9b2bb3 Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000 Exception code: 0xc000041d Fault offset: 0x74f84f0d Faulting process id: 0xeac Faulting application start time: 0x01ccdc66344e34b1 Faulting application path: C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE Faulting module path: unknown Report Id: 8838f3ca-4859-11e1-95b5-00268337ffbb **Details Tab** - EventData EXCEL.EXE 14.0.6112.5000 4e9b2bb3 unknown 0.0.0.0 00000000 c000041d 74f84f0d eac 01ccdc66344e34b1 C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE unknown 8838f3ca-4859-11e1-95b5-00268337ffbb **The Information message (25 seconds later) Event 1001 Windows Error Reporting** **General Tab** Fault bucket 2749009225, type 1 Event Name: APPCRASH Response: Not available Cab Id: 0 Problem signature: P1: EXCEL.EXE P2: 14.0.6112.5000 P3: 4e9b2bb3 P4: StackHash_a547 P5: 0.0.0.0 P6: 00000000 P7: c000041d P8: 74f84f0d P9: P10: Attached files: C:\Users\Admin\AppData\Local\Temp\CVR6197.tmp.cvr C:\Users\Admin\AppData\Local\Temp\WERF3A8.tmp.WERInternalMetadata.xml These files may be available here: C:\Users\Admin\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_EXCEL.EXE_acde796b44eb6c6f045f43e79a21ae83e87f27_0a8e377b Analysis symbol: Rechecking for solution: 0 Report Id: 8838f3ca-4859-11e1-95b5-00268337ffbb Report Status: 0 **Details Tab** - EventData 2749009225 1 APPCRASH Not available 0 EXCEL.EXE 14.0.6112.5000 4e9b2bb3 StackHash_a547 0.0.0.0 00000000 c000041d 74f84f0d C:\Users\Admin\AppData\Local\Temp\CVR6197.tmp.cvr C:\Users\Admin\AppData\Local\Temp\WERF3A8.tmp.WERInternalMetadata.xml C:\Users\Admin\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_EXCEL.EXE_acde796b44eb6c6f045f43e79a21ae83e87f27_0a8e377b 0 8838f3ca-4859-11e1-95b5-00268337ffbb 0
excel
office
null
null
null
01/27/2012 22:15:43
off topic
Excel has stopped working error when closing excel with VB Editor Open === **System: Office 10 32 bit SP1 running on Windows 7 64 bit.** This is a pretty clean install as the machine was only built two weeks ago. However I do also have Office XP (really) installed on this system. Whenever I close Excel when the VB Editor window is open, I get the error message "Microsoft Excel has stopped working A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available." I do not have another instance of either version of Excel running - at the moment the only programs that I have started are Firefox (to write this) and Outlook. I have tried this opening Excel normally and in safe mode (ie with no addins installed). This happens even if I have done nothing but open excel, open the VBE then close excel. It seems that I have exactly the same issue doing this in Excel 2010 and Excel XP. I have tried to repair the installation of Office 2010 but that has not made any difference. Looking in the Systems log (Control Panel, Admin Tools, Event Viewer, Windows Logs, Application) there are a list of various level events. The ones that relate to excel failing to close are an error level and an information level shown below. If anyone has any brilliant ideas how to fix this - or how to get Microsoft to look into it I would be extremely grateful. **The Error one is as follows: Event 1000 Application Error** **General Tab:** Faulting application name: EXCEL.EXE, version: 14.0.6112.5000, time stamp: 0x4e9b2bb3 Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000 Exception code: 0xc000041d Fault offset: 0x74f84f0d Faulting process id: 0xeac Faulting application start time: 0x01ccdc66344e34b1 Faulting application path: C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE Faulting module path: unknown Report Id: 8838f3ca-4859-11e1-95b5-00268337ffbb **Details Tab** - EventData EXCEL.EXE 14.0.6112.5000 4e9b2bb3 unknown 0.0.0.0 00000000 c000041d 74f84f0d eac 01ccdc66344e34b1 C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE unknown 8838f3ca-4859-11e1-95b5-00268337ffbb **The Information message (25 seconds later) Event 1001 Windows Error Reporting** **General Tab** Fault bucket 2749009225, type 1 Event Name: APPCRASH Response: Not available Cab Id: 0 Problem signature: P1: EXCEL.EXE P2: 14.0.6112.5000 P3: 4e9b2bb3 P4: StackHash_a547 P5: 0.0.0.0 P6: 00000000 P7: c000041d P8: 74f84f0d P9: P10: Attached files: C:\Users\Admin\AppData\Local\Temp\CVR6197.tmp.cvr C:\Users\Admin\AppData\Local\Temp\WERF3A8.tmp.WERInternalMetadata.xml These files may be available here: C:\Users\Admin\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_EXCEL.EXE_acde796b44eb6c6f045f43e79a21ae83e87f27_0a8e377b Analysis symbol: Rechecking for solution: 0 Report Id: 8838f3ca-4859-11e1-95b5-00268337ffbb Report Status: 0 **Details Tab** - EventData 2749009225 1 APPCRASH Not available 0 EXCEL.EXE 14.0.6112.5000 4e9b2bb3 StackHash_a547 0.0.0.0 00000000 c000041d 74f84f0d C:\Users\Admin\AppData\Local\Temp\CVR6197.tmp.cvr C:\Users\Admin\AppData\Local\Temp\WERF3A8.tmp.WERInternalMetadata.xml C:\Users\Admin\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_EXCEL.EXE_acde796b44eb6c6f045f43e79a21ae83e87f27_0a8e377b 0 8838f3ca-4859-11e1-95b5-00268337ffbb 0
2
11,537,465
07/18/2012 08:43:35
1,514,206
07/10/2012 08:40:30
4
0
how to store list into sqlitedatabse?
I need to store list of contacts into sqlite database. I've displayed contacts in my project application using Contacts Content Provider. I just need to store the list from emulator into database. Anyone knows how? please help thanks.
android
emulator
contacts
store
sqlitedatabase
null
open
how to store list into sqlitedatabse? === I need to store list of contacts into sqlite database. I've displayed contacts in my project application using Contacts Content Provider. I just need to store the list from emulator into database. Anyone knows how? please help thanks.
0
8,803,938
01/10/2012 13:23:32
1,088,220
12/08/2011 17:14:15
59
1
Simple program does not compile
I use Dev-C++ , it doesnt show any code error but fail to work #include<stdio.h> #include<stdlib.h> #include<math.h> main() { int a=1,b=2,i,N=3999998,t[N],R=3; t[0]=1; t[1]=2; for(i=2;i<N;i++){ t[i]=t[i-2]+t[i-1]; R=R+t[i]; } printf("%d\n",R); system("pause"); }
c++
c
null
null
null
01/10/2012 13:30:42
too localized
Simple program does not compile === I use Dev-C++ , it doesnt show any code error but fail to work #include<stdio.h> #include<stdlib.h> #include<math.h> main() { int a=1,b=2,i,N=3999998,t[N],R=3; t[0]=1; t[1]=2; for(i=2;i<N;i++){ t[i]=t[i-2]+t[i-1]; R=R+t[i]; } printf("%d\n",R); system("pause"); }
3
6,732,356
07/18/2011 11:42:07
831,334
07/06/2011 10:08:59
1
0
Content Injection in PHP
Good day! Do you have an idea on how can I inject a portion of my advertisement in every page I visited? just like floating wherever site I will go. it will work to my local server only. when the guest try to connect in my access point, it will display automatically at the top. I am using linux and php. thank you!
php
javascript
linux
access-point
null
07/20/2011 00:13:36
not a real question
Content Injection in PHP === Good day! Do you have an idea on how can I inject a portion of my advertisement in every page I visited? just like floating wherever site I will go. it will work to my local server only. when the guest try to connect in my access point, it will display automatically at the top. I am using linux and php. thank you!
1
6,709,928
07/15/2011 16:02:42
415,286
08/09/2010 16:14:00
587
9
Should I rewrite my app?
So here's the story, About a year and a half ago I started working on a contact database program for my church in ASP.NET web forms cause it was all I knew. I didn't really get very far! I then decided that I hadn't got anywhere at all and decided to scrap my .NET code and start again in PHP.. Which at the time I didn't know and was flashy and exciting to me.. Again got nowhere.. So a third time I began the process of reimplementing my half baked site in ruby on rails.. And I finally got somewhere! But it took me staying up literally all night cranking out code with misty eyes! And now the app is a big convoluted mess (go figure) - no unit tests, big kludgy magic methods and an overall confusion of what's actually going on inside.. 1 and a half months time from now I plan on shipping a 1.0 to my incredibly patient users.. Is it a horrendously bad idea for me to start a new rails project and carefully and (test drivenly) copy or reimplement my existing code? (baring in mind I was working on it after work the first time around and plan on taking 2 weeks holiday off work to work on it this time!) Thanks!
ruby-on-rails
null
null
null
null
07/15/2011 16:15:25
not constructive
Should I rewrite my app? === So here's the story, About a year and a half ago I started working on a contact database program for my church in ASP.NET web forms cause it was all I knew. I didn't really get very far! I then decided that I hadn't got anywhere at all and decided to scrap my .NET code and start again in PHP.. Which at the time I didn't know and was flashy and exciting to me.. Again got nowhere.. So a third time I began the process of reimplementing my half baked site in ruby on rails.. And I finally got somewhere! But it took me staying up literally all night cranking out code with misty eyes! And now the app is a big convoluted mess (go figure) - no unit tests, big kludgy magic methods and an overall confusion of what's actually going on inside.. 1 and a half months time from now I plan on shipping a 1.0 to my incredibly patient users.. Is it a horrendously bad idea for me to start a new rails project and carefully and (test drivenly) copy or reimplement my existing code? (baring in mind I was working on it after work the first time around and plan on taking 2 weeks holiday off work to work on it this time!) Thanks!
4
3,301,051
07/21/2010 15:33:44
398,137
07/21/2010 15:20:27
1
0
NoSQL and REST web-services
I understand that if you use SUN's Jersey REST implementation framework, you get the ability to use XML and JSON doc's interchangably. I've tried this in a simple REST service and it works just fine, marshalling XML or JSON to Java objects and back again without any problems. My Question is this..... ***Whats the simplest 'NoSQL' way to persist these Java object's?*** I have a JPA solution already that works really well - its OO and I can use the same Java objects for marshalling/persistence, but I'm interested if a NoSQL database will give me an even simpler more scalable document-centric mechanism for saving my entities in persistent storage? Suggestions with windows friendly NoSQL or embedded in JVM NoSQL would be great!
xml
json
rest
nosql
jersey
null
open
NoSQL and REST web-services === I understand that if you use SUN's Jersey REST implementation framework, you get the ability to use XML and JSON doc's interchangably. I've tried this in a simple REST service and it works just fine, marshalling XML or JSON to Java objects and back again without any problems. My Question is this..... ***Whats the simplest 'NoSQL' way to persist these Java object's?*** I have a JPA solution already that works really well - its OO and I can use the same Java objects for marshalling/persistence, but I'm interested if a NoSQL database will give me an even simpler more scalable document-centric mechanism for saving my entities in persistent storage? Suggestions with windows friendly NoSQL or embedded in JVM NoSQL would be great!
0
5,036,430
02/18/2011 00:29:13
620,615
02/17/2011 01:29:46
24
1
error of importing DBI in Perl
I am writing the code in Perl and try to save it in the extension .pm not .pl and I use "use DBI;" to import the DBI in order i can execute the query. and the error is "complication failed in require". However, I did use in script.pl , it s okay.. it works.. Please help and thank you very much Winnie
perl
null
null
null
null
null
open
error of importing DBI in Perl === I am writing the code in Perl and try to save it in the extension .pm not .pl and I use "use DBI;" to import the DBI in order i can execute the query. and the error is "complication failed in require". However, I did use in script.pl , it s okay.. it works.. Please help and thank you very much Winnie
0
11,367,481
07/06/2012 18:07:11
236,550
12/22/2009 03:34:22
1
1
how to build graphviz jni dll
I use visual studio to build graphviz jni dll,but dosen't succeed Linking... Creating library ..\..\..\graphviz-ms\bin\libgv_java.lib and object ..\..\..\graphviz-ms\bin\libgv_java.exp libgv_java.obj : error LNK2019: unresolved external symbol "struct Agraph_t * __cdecl graph(char *)" (?graph@@YAPAUAgraph_t@@PAD@Z) referenced in function _Java_gvJNI_graph_1_1SWIG_10@12 libgv_java.obj : error LNK2019: unresolved external symbol "struct Agraph_t * __cdecl digraph(char *)" (?digraph@@YAPAUAgraph_t@@PAD@Z) referenced in function _Java_gvJNI_digraph@12
visual-studio
dll
jni
graphviz
null
07/08/2012 09:28:19
not a real question
how to build graphviz jni dll === I use visual studio to build graphviz jni dll,but dosen't succeed Linking... Creating library ..\..\..\graphviz-ms\bin\libgv_java.lib and object ..\..\..\graphviz-ms\bin\libgv_java.exp libgv_java.obj : error LNK2019: unresolved external symbol "struct Agraph_t * __cdecl graph(char *)" (?graph@@YAPAUAgraph_t@@PAD@Z) referenced in function _Java_gvJNI_graph_1_1SWIG_10@12 libgv_java.obj : error LNK2019: unresolved external symbol "struct Agraph_t * __cdecl digraph(char *)" (?digraph@@YAPAUAgraph_t@@PAD@Z) referenced in function _Java_gvJNI_digraph@12
1
2,945,943
05/31/2010 21:01:18
54,760
01/13/2009 20:41:17
203
6
What is the name of the Windows System Menu button?
What is the name of the Windows System Menu button? I am talling about the round glass-orb looking object (on a Windows 7 operating system) that appears in the lower left of the screen -- usually -- that you can click on to see the menu selection of programs on your compter.
windows
windows-7
button
null
null
05/31/2010 21:49:46
off topic
What is the name of the Windows System Menu button? === What is the name of the Windows System Menu button? I am talling about the round glass-orb looking object (on a Windows 7 operating system) that appears in the lower left of the screen -- usually -- that you can click on to see the menu selection of programs on your compter.
2
772,354
04/21/2009 12:37:03
82,037
03/24/2009 14:12:17
30
1
AppDomain.GetCurrentThreadID vs Thread.ManagedThreadID for Windows API calls?
I'm trying to create a hook to monitor the current position of the mouse cursor. Nothing important, I just need to count some pixels during interface design and wanted to learn how to create a hook, so I decided to go for a hard way instead of a sane way. I've found example code which declares the following function: <DllImport("User32.dll", CharSet:=CharSet.Auto, _ CallingConvention:=CallingConvention.StdCall)> _ Public Overloads Shared Function SetWindowsHookEx _ (ByVal idHook As Integer, ByVal HookProc As CallBack, _ ByVal hInstance As IntPtr, ByVal wParam As Integer) As Integer End Function When the function is called, the following code is used: hHook = SetWindowsHookEx(WH_MOUSE, _ hookproc, _ IntPtr.Zero, _ AppDomain.GetCurrentThreadId()) But Appdomain.GetCurrentThreadID generates the warning: "'Public Shared Function GetCurrentThreadId() As Integer' is obsolete: 'AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread." I've tried using ManagedThreadID, but that doesn't work. The thread ID returned seems to be the logical thread ID of the thread, as it runs in the .net runtime, rather than the Win32 thread identifier. Calling the function ith AppDomain.GetCurrentThreadID works, but I really would like to have a "stable identifier" for my thread. Can someone explain to me whether it is possible to use ManagedThreadID in this context (I assume not) and, if not, the things I need to avoid in order to stop the AppDomain.CurrentThreadID from becoming "unstable"? Cheers
.net
vb.net
winapi
null
null
null
open
AppDomain.GetCurrentThreadID vs Thread.ManagedThreadID for Windows API calls? === I'm trying to create a hook to monitor the current position of the mouse cursor. Nothing important, I just need to count some pixels during interface design and wanted to learn how to create a hook, so I decided to go for a hard way instead of a sane way. I've found example code which declares the following function: <DllImport("User32.dll", CharSet:=CharSet.Auto, _ CallingConvention:=CallingConvention.StdCall)> _ Public Overloads Shared Function SetWindowsHookEx _ (ByVal idHook As Integer, ByVal HookProc As CallBack, _ ByVal hInstance As IntPtr, ByVal wParam As Integer) As Integer End Function When the function is called, the following code is used: hHook = SetWindowsHookEx(WH_MOUSE, _ hookproc, _ IntPtr.Zero, _ AppDomain.GetCurrentThreadId()) But Appdomain.GetCurrentThreadID generates the warning: "'Public Shared Function GetCurrentThreadId() As Integer' is obsolete: 'AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread." I've tried using ManagedThreadID, but that doesn't work. The thread ID returned seems to be the logical thread ID of the thread, as it runs in the .net runtime, rather than the Win32 thread identifier. Calling the function ith AppDomain.GetCurrentThreadID works, but I really would like to have a "stable identifier" for my thread. Can someone explain to me whether it is possible to use ManagedThreadID in this context (I assume not) and, if not, the things I need to avoid in order to stop the AppDomain.CurrentThreadID from becoming "unstable"? Cheers
0
5,838,062
04/29/2011 22:34:37
338,152
05/11/2010 10:27:17
50
0
Octave while/for statement -- what's wrong in a code?
This is my Octave code for K= 1:10 while ( p < 1 ) ceil(log2(K)) + 1/(1-(1-p)^K) %function p = p + sens; K endwhile; endfor K and here is an output: ans = 10.000 K = 1 ans = 5.0000 K = 1 ans = 3.3333 K = 1 ans = 2.5000 K = 1 ans = 2 K = 1 ans = 1.6667 K = 1 ans = 1.4286 K = 1 ans = 1.2500 K = 1 ans = 1.1111 K = 1 ans = 1 K = 1 K = 10 So, as you can see -- in inner `while` statement value of `K` is fixed to 1. What I am supposed to do to vary this value between 1 and 10. Why it is not working? I have no idea why this inner `while` statement is proceed o
while-loops
octave
null
null
null
null
open
Octave while/for statement -- what's wrong in a code? === This is my Octave code for K= 1:10 while ( p < 1 ) ceil(log2(K)) + 1/(1-(1-p)^K) %function p = p + sens; K endwhile; endfor K and here is an output: ans = 10.000 K = 1 ans = 5.0000 K = 1 ans = 3.3333 K = 1 ans = 2.5000 K = 1 ans = 2 K = 1 ans = 1.6667 K = 1 ans = 1.4286 K = 1 ans = 1.2500 K = 1 ans = 1.1111 K = 1 ans = 1 K = 1 K = 10 So, as you can see -- in inner `while` statement value of `K` is fixed to 1. What I am supposed to do to vary this value between 1 and 10. Why it is not working? I have no idea why this inner `while` statement is proceed o
0
4,177,744
11/14/2010 13:48:59
300,713
03/24/2010 10:37:18
75
0
c++ OSX open default browser!
I would like to know a way to open the default browser on osx from a c++ application and then open a requested URL. thanks!
c++
osx
url
browser
null
null
open
c++ OSX open default browser! === I would like to know a way to open the default browser on osx from a c++ application and then open a requested URL. thanks!
0
10,395,388
05/01/2012 08:36:48
1,124,946
01/01/2012 08:28:56
163
0
why the system can change the displayer's resolution?
**Why the system can change the displayer's resolution?** In my mind, the displayer's resolution is decided by the hardware. Where is my fault point, thank you..
windows
hardware
null
null
null
05/03/2012 09:03:36
off topic
why the system can change the displayer's resolution? === **Why the system can change the displayer's resolution?** In my mind, the displayer's resolution is decided by the hardware. Where is my fault point, thank you..
2
9,427,588
02/24/2012 08:28:26
1,066,679
11/26/2011 07:37:16
21
0
Which is the best method to store friendlist in php?
In order to implement friends list method in my webpage, **Which is the best way to store friends list in php?** My options are **Database** See ***[this Link][1]*** or create a **separate folder for each user and store an xml file** which contains that user's friendslist. Please do suggest me the best one? If anyone has other logic.let me know about it. [1]: http://bytes.com/topic/mysql/answers/837763-storing-list-data-mysql
php
friendship
null
null
null
02/26/2012 05:57:41
not constructive
Which is the best method to store friendlist in php? === In order to implement friends list method in my webpage, **Which is the best way to store friends list in php?** My options are **Database** See ***[this Link][1]*** or create a **separate folder for each user and store an xml file** which contains that user's friendslist. Please do suggest me the best one? If anyone has other logic.let me know about it. [1]: http://bytes.com/topic/mysql/answers/837763-storing-list-data-mysql
4
7,320,088
09/06/2011 12:41:00
930,554
09/06/2011 11:39:08
1
0
How to read the XML file in java
<?xml version="1.0"?> <smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" xmlns:ftl="http://www.milyn.org/xsd/smooks/freemarker-1.1.xsd" xmlns:db="http://www.milyn.org/xsd/smooks/db-routing-1.1.xsd" xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.2.xsd" xmlns:ds="http://www.milyn.org/xsd/smooks/datasource-1.1.xsd"> <ds:direct bindOnElement="#document" datasource="DB" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/dbase" username="root" password="praya123" autoCommit="false" /> <db:executor executeOnElement="Invoice" datasource="DB" executeBefore="true"> <db:statement>SELECT * FROM custinfo</db:statement> <db:resultSet name="rs_custinfo" /> </db:executor> <db:executor executeOnElement="Invoice" datasource="DB" executeBefore="true"> <db:statement>select * from callRates</db:statement> <db:resultSet name="rs_callRates" /> </db:executor> <db:executor executeOnElement="Invoice" datasource="DB" executeBefore="true"> <db:statement>select * from InvoiceSummary</db:statement> <db:resultSet name="rs_InvoiceSummary" /> </db:executor> <db:executor executeOnElement="Invoice" datasource="DB" executeBefore="true"> <db:statement>select * from InvoiceDetail</db:statement> <db:resultSet name="rs_InvoiceDetail" /> </db:executor> <ftl:freemarker applyOnElement="Invoice"> <ftl:template> <!-- <#assign x=1> <#list 1..x as i> <DETAIL> <DT_INV_HDR1>${rs_custinfo[i].BillingAccNo}</DT_INV_HDR1> <DT_INV_HDR2>${rs_custinfo[i].CustNo}</DT_INV_HDR2> <DT_INV_HDR3>${rs_custinfo[i].InvoiceNo}</DT_INV_HDR3> <DT_INV_HDR4>${rs_custinfo[i].InvoiceDate}</DT_INV_HDR4> <DT_INV_HDR5>${rs_custinfo[i].PaymentDueDate}</DT_INV_HDR5> <DT_INV_HDR6/> <DT_INV_HDR7/> </DETAIL> </#list> --> </ftl:template> </ftl:freemarker> </smooks-resource-list> how to fetch data with java ? Can anyone give any specific way to do that ?
java
xml
null
null
null
09/12/2011 20:03:00
not a real question
How to read the XML file in java === <?xml version="1.0"?> <smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" xmlns:ftl="http://www.milyn.org/xsd/smooks/freemarker-1.1.xsd" xmlns:db="http://www.milyn.org/xsd/smooks/db-routing-1.1.xsd" xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.2.xsd" xmlns:ds="http://www.milyn.org/xsd/smooks/datasource-1.1.xsd"> <ds:direct bindOnElement="#document" datasource="DB" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/dbase" username="root" password="praya123" autoCommit="false" /> <db:executor executeOnElement="Invoice" datasource="DB" executeBefore="true"> <db:statement>SELECT * FROM custinfo</db:statement> <db:resultSet name="rs_custinfo" /> </db:executor> <db:executor executeOnElement="Invoice" datasource="DB" executeBefore="true"> <db:statement>select * from callRates</db:statement> <db:resultSet name="rs_callRates" /> </db:executor> <db:executor executeOnElement="Invoice" datasource="DB" executeBefore="true"> <db:statement>select * from InvoiceSummary</db:statement> <db:resultSet name="rs_InvoiceSummary" /> </db:executor> <db:executor executeOnElement="Invoice" datasource="DB" executeBefore="true"> <db:statement>select * from InvoiceDetail</db:statement> <db:resultSet name="rs_InvoiceDetail" /> </db:executor> <ftl:freemarker applyOnElement="Invoice"> <ftl:template> <!-- <#assign x=1> <#list 1..x as i> <DETAIL> <DT_INV_HDR1>${rs_custinfo[i].BillingAccNo}</DT_INV_HDR1> <DT_INV_HDR2>${rs_custinfo[i].CustNo}</DT_INV_HDR2> <DT_INV_HDR3>${rs_custinfo[i].InvoiceNo}</DT_INV_HDR3> <DT_INV_HDR4>${rs_custinfo[i].InvoiceDate}</DT_INV_HDR4> <DT_INV_HDR5>${rs_custinfo[i].PaymentDueDate}</DT_INV_HDR5> <DT_INV_HDR6/> <DT_INV_HDR7/> </DETAIL> </#list> --> </ftl:template> </ftl:freemarker> </smooks-resource-list> how to fetch data with java ? Can anyone give any specific way to do that ?
1
10,195,044
04/17/2012 16:17:29
555,146
12/27/2010 16:32:17
287
31
Dependency injection alternatives to Unity.Mvc
I've been using Unity.Mvc3 but have recently run into some intermittent issues with it and now have to back peddle and implement something that is more reliable. What are the alternatives? What are most using right now? Thanks in advance for any replies. BTW, using the Unity.Mvc3 NuGet package with a Mvc4 project works "onyl when it feels like it". :) The error when it acts up is" "The type Unity.Mvc3.UnityDependencyResolver does not appear to implement Microsoft.Practices.ServiceLocation.IServiceLocator. Parameter name: commonServiceLocator" And it occurs on this line: ' Set DI resolver DependencyResolver.SetResolver(New UnityDependencyResolver(dependencyContainer)) Uninstalling and then reinstalling the package clears it up once in awhile, but nothing is resolving it today.
asp.net-mvc-3
dependency-injection
asp.net-mvc-4
null
null
04/19/2012 14:41:13
not constructive
Dependency injection alternatives to Unity.Mvc === I've been using Unity.Mvc3 but have recently run into some intermittent issues with it and now have to back peddle and implement something that is more reliable. What are the alternatives? What are most using right now? Thanks in advance for any replies. BTW, using the Unity.Mvc3 NuGet package with a Mvc4 project works "onyl when it feels like it". :) The error when it acts up is" "The type Unity.Mvc3.UnityDependencyResolver does not appear to implement Microsoft.Practices.ServiceLocation.IServiceLocator. Parameter name: commonServiceLocator" And it occurs on this line: ' Set DI resolver DependencyResolver.SetResolver(New UnityDependencyResolver(dependencyContainer)) Uninstalling and then reinstalling the package clears it up once in awhile, but nothing is resolving it today.
4
11,599,056
07/22/2012 09:19:01
1,238,424
02/28/2012 17:13:54
26
0
Error 1045 while configuring the mysql
I can install the mysql but while configuring it i am getting error like this: ** 1045 : access denied for user root@loaclhost.** i can install it i cant configure it. Please help...I am quite new to this.
mysql
sql
database-connection
mysql-error-1045
null
07/23/2012 00:01:14
off topic
Error 1045 while configuring the mysql === I can install the mysql but while configuring it i am getting error like this: ** 1045 : access denied for user root@loaclhost.** i can install it i cant configure it. Please help...I am quite new to this.
2
11,704,289
07/28/2012 20:09:53
1,421,836
05/28/2012 13:41:59
178
12
Add to favourites/bookmarks bar in Safari (CMD +D)
From much research, I have found nothing that supports the idea that Safari even supports this feature. From how much API there is for Safari, I can't believe that they wouldn't allow this to be embedded with their browser. If anyone has any ideas of how this can be achieved without using some horrible plugin that doesn't actually work, it would be greatly appreciated. So far, I have taken care of the main browsers by using this: $("#bookmark").click(function() { var url = this.href; var title = this.title; if($.browser.mozilla) { window.sidebar.addPanel(title, url,""); } else if($.browser.msie || $.browser.webkit) { window.external.AddFavorite(url, title); if($.browser.safari) { alert("Balls"); } } else if($.browser.opera ) { $(this).attr("href", url); $(this).attr("title", title); $(this).attr("rel", "sidebar"); $(this).click(); } else { //alert("Please press CTRL+D and click the link to bookmark it in your browser."); } return false; });
javascript
jquery
safari
bookmarklet
bookmarks
null
open
Add to favourites/bookmarks bar in Safari (CMD +D) === From much research, I have found nothing that supports the idea that Safari even supports this feature. From how much API there is for Safari, I can't believe that they wouldn't allow this to be embedded with their browser. If anyone has any ideas of how this can be achieved without using some horrible plugin that doesn't actually work, it would be greatly appreciated. So far, I have taken care of the main browsers by using this: $("#bookmark").click(function() { var url = this.href; var title = this.title; if($.browser.mozilla) { window.sidebar.addPanel(title, url,""); } else if($.browser.msie || $.browser.webkit) { window.external.AddFavorite(url, title); if($.browser.safari) { alert("Balls"); } } else if($.browser.opera ) { $(this).attr("href", url); $(this).attr("title", title); $(this).attr("rel", "sidebar"); $(this).click(); } else { //alert("Please press CTRL+D and click the link to bookmark it in your browser."); } return false; });
0
5,152,351
03/01/2011 09:05:38
639,068
03/01/2011 09:05:38
1
0
Is there any sticky note application thay available after computer locked
Threre are sticky note aplication in windows as well as linux.But they running when computer is running when user is logged.but I need to know is whether there is a program that run after the computer is locked
windows
application
null
null
null
03/01/2011 13:58:48
off topic
Is there any sticky note application thay available after computer locked === Threre are sticky note aplication in windows as well as linux.But they running when computer is running when user is logged.but I need to know is whether there is a program that run after the computer is locked
2
2,469,601
03/18/2010 12:02:53
217,916
11/24/2009 16:03:01
17
0
How to make a thread stay runnig in c#
I have a Windows Form Application (Form1) that allow the user to open another Forms (FormGraph). In order to open the FormGraph App I use a thread that open it. Here is the code that the thread is running: private void ThreadCreateCurvedGraph() { FormGraph myGraph = new FormGraph(); myGraph.CreateCurvedGraph(...); myGraph.Show(); } My problem is that myGraph closed right after it's open. 1) Does anyone know why this is happening and how to make myGraph stay open? 2) After the user closed myGraph, How do I terminate the thread? Many thanks!
c#
multithreading
winforms
null
null
null
open
How to make a thread stay runnig in c# === I have a Windows Form Application (Form1) that allow the user to open another Forms (FormGraph). In order to open the FormGraph App I use a thread that open it. Here is the code that the thread is running: private void ThreadCreateCurvedGraph() { FormGraph myGraph = new FormGraph(); myGraph.CreateCurvedGraph(...); myGraph.Show(); } My problem is that myGraph closed right after it's open. 1) Does anyone know why this is happening and how to make myGraph stay open? 2) After the user closed myGraph, How do I terminate the thread? Many thanks!
0
1,775,943
11/21/2009 16:26:54
145,018
07/25/2009 15:36:47
61
2
Use case diagram question
I'm doing a use case diagram for taxi booking system, which should help controllers with booking and dispatching radio controlled taxis. Customers will have to pay in advance. If booking is not immediate (taxi needs to be available at some time in the future), the system should dispatch taxi without any involvement of the controller. Below is the link to the use case diagram: [http://img260.imageshack.us/i/usecasediagram.jpg/][1] [1]: http://img260.imageshack.us/i/usecasediagram.jpg/ I’m not sure if I need to include customer (actor) in the diagram. Technically it is the controller who interacts with the system, however if I assume that “phone lines” are part of the system, than I think it makes sense to include customer.
use-case
null
null
null
null
null
open
Use case diagram question === I'm doing a use case diagram for taxi booking system, which should help controllers with booking and dispatching radio controlled taxis. Customers will have to pay in advance. If booking is not immediate (taxi needs to be available at some time in the future), the system should dispatch taxi without any involvement of the controller. Below is the link to the use case diagram: [http://img260.imageshack.us/i/usecasediagram.jpg/][1] [1]: http://img260.imageshack.us/i/usecasediagram.jpg/ I’m not sure if I need to include customer (actor) in the diagram. Technically it is the controller who interacts with the system, however if I assume that “phone lines” are part of the system, than I think it makes sense to include customer.
0
7,845,453
10/21/2011 05:50:47
956,001
09/21/2011 02:47:00
1
0
API for Automatic 2D/3D
Is there any auto 2D to 3D api in the openGL or in Android sdk? Since I have read the news that Gingerbread has add the automatic 2D/3D conversion feature. However I cannot find the api
android
opengl
3d
null
null
10/21/2011 15:06:03
not a real question
API for Automatic 2D/3D === Is there any auto 2D to 3D api in the openGL or in Android sdk? Since I have read the news that Gingerbread has add the automatic 2D/3D conversion feature. However I cannot find the api
1
2,262,773
02/14/2010 21:07:04
99,694
05/02/2009 00:59:25
422
6
Is it easy to switch from relational to non-relational databases with Rails?
Good day, I have been using Rails/Mysql for the past while but I have been hearing about Cassandra, MongoDB, CouchDB and other document-store DB/Non-relational databases. I'm planning to explore them later as they might be better alternative for scalability. I'm planning to start an application soon. Will it make a different with Rails design if I move from relational to non-relational database? I know Rails migrations are database-agnostic but wasn't sure if moving to non-relational will make difference with design or not.
ruby-on-rails
database-design
relational-database
non-relational-database
null
null
open
Is it easy to switch from relational to non-relational databases with Rails? === Good day, I have been using Rails/Mysql for the past while but I have been hearing about Cassandra, MongoDB, CouchDB and other document-store DB/Non-relational databases. I'm planning to explore them later as they might be better alternative for scalability. I'm planning to start an application soon. Will it make a different with Rails design if I move from relational to non-relational database? I know Rails migrations are database-agnostic but wasn't sure if moving to non-relational will make difference with design or not.
0
6,582,252
07/05/2011 11:56:07
829,561
06/24/2011 17:25:21
1
0
Is there any good reference books for iphone?
I am new to iphone can u please give me the some reference book names and pdf url's please help me. Thanks
iphone
null
null
null
null
07/05/2011 11:58:47
not a real question
Is there any good reference books for iphone? === I am new to iphone can u please give me the some reference book names and pdf url's please help me. Thanks
1
2,827,625
05/13/2010 14:34:29
320,276
04/19/2010 11:34:21
10
1
how to access layout-large layout in the activity?
I am having layout which I want to render on to different sizes of mobile (like WVGA854). Resource structure is like res\layout\main.xml res\layout-large\main.xml By default it is taking layout main.xml file itself of layout. Its not pointing to layout-large\main.xml its throwing exception:Activity can not start resource not found So can any one guide me how can I acheive this and how to support mutiple screens with different layouts like large,small and default along with images specified in respective dip folders. Thanks in advance Regards: Jayanth
layout
android
activity
null
null
null
open
how to access layout-large layout in the activity? === I am having layout which I want to render on to different sizes of mobile (like WVGA854). Resource structure is like res\layout\main.xml res\layout-large\main.xml By default it is taking layout main.xml file itself of layout. Its not pointing to layout-large\main.xml its throwing exception:Activity can not start resource not found So can any one guide me how can I acheive this and how to support mutiple screens with different layouts like large,small and default along with images specified in respective dip folders. Thanks in advance Regards: Jayanth
0
6,904,226
08/01/2011 20:44:59
680,696
03/28/2011 17:47:15
28
1
Location of folder to write a file to so that it will be sent as email?
Excuse the noob but, is there a folder that I can write a text file to (with the proper to,from,Subject,Body) headers/parts, etc. that when saved will we sent as an email (by sendmail).
sendmail
folders
null
null
null
08/01/2011 21:01:49
off topic
Location of folder to write a file to so that it will be sent as email? === Excuse the noob but, is there a folder that I can write a text file to (with the proper to,from,Subject,Body) headers/parts, etc. that when saved will we sent as an email (by sendmail).
2
7,331,853
09/07/2011 09:48:41
932,432
09/07/2011 09:48:41
1
0
how to check if function parameter is in array php
I have an array that contains the user name and password. How do I make a simple if statement that checks if the correct user logs in? private $users = array ( 'User1' => 'Pass1', 'Foo' => 'Bar' );
php
arrays
null
null
null
09/07/2011 15:28:38
not a real question
how to check if function parameter is in array php === I have an array that contains the user name and password. How do I make a simple if statement that checks if the correct user logs in? private $users = array ( 'User1' => 'Pass1', 'Foo' => 'Bar' );
1
2,424,708
03/11/2010 12:05:03
63,898
02/08/2009 15:47:03
54
0
what is the best free editor for xslt and mybe xsl:fo and xml?
im looking for free IDE to work with xslt and xml's and even xsl:fo is there any out there? ( i really didn't found any free tool ..)
xslt
xml
ide
null
null
09/01/2011 13:29:30
not constructive
what is the best free editor for xslt and mybe xsl:fo and xml? === im looking for free IDE to work with xslt and xml's and even xsl:fo is there any out there? ( i really didn't found any free tool ..)
4
10,116,360
04/12/2012 01:46:04
1,059,993
11/22/2011 14:39:12
1
0
.NET Software Licensing Solutions
I know this question has been asked many times but I am trying to get a poll/opinions on the various commercial licensing protection SDKs that are available for .NET applications. I am looking for the following: 1) Unlock for applications that aren't connected to the internet. 2) Floating licenses for our corporate customers where they can deploy the licensing server and we unlock it for X number of licenses. 3) Floating and fixed licenses that can be unlocked via the internet. 4) Time restricted licenses. 5) Ability to turn certain features in the software on/off based on unlock. I am not asking for anyone to point out specific solutions for me but what have you used in the past/present and how favorable are you with the solution? I have used Crypkey in the past(rock solid, really expensive) but it doesn't have any hosted solutions for unlocking licenses. There are literally dozens of solutions out there and it's hard to wade through all of it and pick a winner. Would be great if there was a Visual Studio magazine article defining the leaders in the space.
.net
licensing
protection
null
null
04/12/2012 13:12:36
not constructive
.NET Software Licensing Solutions === I know this question has been asked many times but I am trying to get a poll/opinions on the various commercial licensing protection SDKs that are available for .NET applications. I am looking for the following: 1) Unlock for applications that aren't connected to the internet. 2) Floating licenses for our corporate customers where they can deploy the licensing server and we unlock it for X number of licenses. 3) Floating and fixed licenses that can be unlocked via the internet. 4) Time restricted licenses. 5) Ability to turn certain features in the software on/off based on unlock. I am not asking for anyone to point out specific solutions for me but what have you used in the past/present and how favorable are you with the solution? I have used Crypkey in the past(rock solid, really expensive) but it doesn't have any hosted solutions for unlocking licenses. There are literally dozens of solutions out there and it's hard to wade through all of it and pick a winner. Would be great if there was a Visual Studio magazine article defining the leaders in the space.
4
5,140,532
02/28/2011 10:02:44
611,647
02/10/2011 15:46:00
5
0
how can i make as this gauge??
http://i.stack.imgur.com/a610D.png i hope make this as image. m....i don`t find sample souce or actcle. thanks answer for me..
iphone
null
null
null
null
null
open
how can i make as this gauge?? === http://i.stack.imgur.com/a610D.png i hope make this as image. m....i don`t find sample souce or actcle. thanks answer for me..
0
3,977,347
10/20/2010 11:38:59
272,706
02/14/2010 10:03:05
469
6
Write a file temporarily on disk in C#
I have the following problem: I have some **(binary) files**, which are embedded in a resource. For some reasons I must write these files temporarily on disk. How should I proceeded ? Maybe this can be done with **GetRandomFilename**() or **GetTempFileName**() ?
c#
.net
file
null
null
null
open
Write a file temporarily on disk in C# === I have the following problem: I have some **(binary) files**, which are embedded in a resource. For some reasons I must write these files temporarily on disk. How should I proceeded ? Maybe this can be done with **GetRandomFilename**() or **GetTempFileName**() ?
0
8,928,112
01/19/2012 14:52:09
1,128,484
01/03/2012 18:52:22
12
0
Convert C# line code to VB.Net
literal.Text = (gridView.Controls[i] as CheckBox).Checked ? "True" : "False"; How to convert this line to VB.Net syntax, could someone please help me?
c#
vb.net
null
null
null
01/19/2012 15:00:54
too localized
Convert C# line code to VB.Net === literal.Text = (gridView.Controls[i] as CheckBox).Checked ? "True" : "False"; How to convert this line to VB.Net syntax, could someone please help me?
3
7,105,502
08/18/2011 09:50:50
783,657
04/06/2011 08:13:16
46
2
Google App engine auto update
Google App Engine always wants me to download and install software when new version released. Any option to do this task automatically ? Why they are not implement the software auto updation ?
google-app-engine
installation
windows-installer
null
null
08/19/2011 04:08:45
off topic
Google App engine auto update === Google App Engine always wants me to download and install software when new version released. Any option to do this task automatically ? Why they are not implement the software auto updation ?
2
2,912,212
05/26/2010 10:51:39
350,811
05/26/2010 10:51:39
1
0
How do I revert from FRF50 back to ERE27?
I got all excited with the leaked froyo update.zip that hit the net a few days ago, and installed it on my phone. Since then I've had many issues, the big one being ADB not discovering my phone. I'd like to revert my phone back, but can't find a signed update.zip on the nets that will do it. Does anyone know how I can revert my N1 from FRF50, back to ERE27? My phone is not rooted.
android
froyo
null
null
null
06/08/2010 09:46:06
off topic
How do I revert from FRF50 back to ERE27? === I got all excited with the leaked froyo update.zip that hit the net a few days ago, and installed it on my phone. Since then I've had many issues, the big one being ADB not discovering my phone. I'd like to revert my phone back, but can't find a signed update.zip on the nets that will do it. Does anyone know how I can revert my N1 from FRF50, back to ERE27? My phone is not rooted.
2
7,260,402
08/31/2011 16:38:24
514,382
11/20/2010 10:24:50
1,672
90
Context-switch and thread execution on different CPU cores
From my another question on SO I found out that its possible that following simple method void B() { if (_complete) { Console.WriteLine (_answer); } } may be executed on different CPUs if context switch happens between if and console writeline call.. This is news to me so I am wondering now when can single thread code become switched for another CPU and why it may make sense in such simple case as above?
c#
.net
multithreading
context-switch
null
null
open
Context-switch and thread execution on different CPU cores === From my another question on SO I found out that its possible that following simple method void B() { if (_complete) { Console.WriteLine (_answer); } } may be executed on different CPUs if context switch happens between if and console writeline call.. This is news to me so I am wondering now when can single thread code become switched for another CPU and why it may make sense in such simple case as above?
0
4,544,887
12/28/2010 09:08:09
555,815
12/28/2010 09:08:09
1
0
Keep some information between different "new" forms
I have a form where the user can choose options from a lot of select boxes. The form is used to register several items from an RSS feed. The user fills in the form, clicks create and is presented with the same form for the next item in the list. Sometimes, the same options are valid for several items in the list, and I would like to be able to save some of the selections done so the user doesn't have to make the same selection for the next items. What is the best way of doing this? I've identified four ways of doing it: ## Sessions Just keep the values in the session hash. This will of course work and is very simple, but I have some undefined feeling that it is a bad idea. It will also not work if the user is using the form from different tabs in the browser. ## Cookies Basically the same as keeping them in the session, I think. ## Profile Can't be done in this case I believe, since profiles are shared between several users. ## Database The most complex way I've come up with is to keep the information in the database and use a query parameter to keep track of which information should be used. This is probably overkill, but in some ways the best way to me. I don't like the idea of keeping this kind of state in session or cookies. Am I missing some way? Or something?
ruby-on-rails
session
null
null
null
null
open
Keep some information between different "new" forms === I have a form where the user can choose options from a lot of select boxes. The form is used to register several items from an RSS feed. The user fills in the form, clicks create and is presented with the same form for the next item in the list. Sometimes, the same options are valid for several items in the list, and I would like to be able to save some of the selections done so the user doesn't have to make the same selection for the next items. What is the best way of doing this? I've identified four ways of doing it: ## Sessions Just keep the values in the session hash. This will of course work and is very simple, but I have some undefined feeling that it is a bad idea. It will also not work if the user is using the form from different tabs in the browser. ## Cookies Basically the same as keeping them in the session, I think. ## Profile Can't be done in this case I believe, since profiles are shared between several users. ## Database The most complex way I've come up with is to keep the information in the database and use a query parameter to keep track of which information should be used. This is probably overkill, but in some ways the best way to me. I don't like the idea of keeping this kind of state in session or cookies. Am I missing some way? Or something?
0
9,456,196
02/26/2012 19:08:27
1,234,228
02/26/2012 18:47:33
1
0
Java is not executing correctly written code. What could be wrong? (screenshot included)
import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Stickman extends JPanel{ public void paintComponent(Graphics g) { super.paintComponent(g); //Color SKY = new Color(135, 206, 235); this.setBackground(Color.WHITE); g.setColor(Color.BLUE); g.fillRect(30, 100, 10, 5); g.setColor(Color.gray); g.fillRect(30, 120, 10, 5); } } ------------------------------------------------------------------------------------------ import javax.swing.*; public class WindowPerameters { public static void main (String[] args) { JFrame f = new JFrame ("Hangman"); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Stickman s = new Stickman(); f.add(s); f.setSize(600, 300); f.setVisible(true); } } http://imgur.com/8AXDt
java
eclipse
jframe
jpanel
null
02/27/2012 13:16:53
not a real question
Java is not executing correctly written code. What could be wrong? (screenshot included) === import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Stickman extends JPanel{ public void paintComponent(Graphics g) { super.paintComponent(g); //Color SKY = new Color(135, 206, 235); this.setBackground(Color.WHITE); g.setColor(Color.BLUE); g.fillRect(30, 100, 10, 5); g.setColor(Color.gray); g.fillRect(30, 120, 10, 5); } } ------------------------------------------------------------------------------------------ import javax.swing.*; public class WindowPerameters { public static void main (String[] args) { JFrame f = new JFrame ("Hangman"); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Stickman s = new Stickman(); f.add(s); f.setSize(600, 300); f.setVisible(true); } } http://imgur.com/8AXDt
1
9,072,726
01/31/2012 00:16:07
1,162,683
01/21/2012 19:11:43
13
2
Install ruby-rvm on Ubuntu 11.10 with ruby 1.9.3
rvm installs properly through: sudo apt-get install ruby-rvm When I try to install ruby 1.9.3 I get these errors? anthony@SnakeDoc:~$ rvm install 1.9.3 mkdir: cannot create directory `/usr/share/ruby-rvm/gems/ruby-1.9.3-p0': Permission denied Installing Ruby from source to: /usr/share/ruby-rvm/rubies/ruby-1.9.3-p0, this may take a while depending on your cpu(s)... ruby-1.9.3-p0 - #fetching ruby-1.9.3-p0 - #extracting ruby-1.9.3-p0 to /usr/share/ruby-rvm/src/ruby-1.9.3-p0 /usr/share/ruby-rvm/scripts/functions/utility: line 142: /usr/share/ruby-rvm/log/ruby- 1.9.3-p0/extract.log: Permission denied /usr/share/ruby-rvm/scripts/functions/utility: line 148: /usr/share/ruby-rvm/log/ruby- 1.9.3-p0/extract.log: Permission denied ERROR: Error running 'bunzip2 < '/usr/share/ruby-rvm/archives/ruby-1.9.3-p0.tar.bz2' | tar xf - -C /usr/share/ruby-rvm/tmp/rvm_src_23435', please read /usr/share/ruby- rvm/log/ruby-1.9.3-p0/extract.log ERROR: There has been an error while trying to extract the source. Halting the installation. ERROR: There has been an error fetching the ruby interpreter. Halting the installation. I tried to chmod the directories where I get access denied but it does not fix the problem. Any suggestions?
ruby
rvm
null
null
null
02/01/2012 03:35:29
off topic
Install ruby-rvm on Ubuntu 11.10 with ruby 1.9.3 === rvm installs properly through: sudo apt-get install ruby-rvm When I try to install ruby 1.9.3 I get these errors? anthony@SnakeDoc:~$ rvm install 1.9.3 mkdir: cannot create directory `/usr/share/ruby-rvm/gems/ruby-1.9.3-p0': Permission denied Installing Ruby from source to: /usr/share/ruby-rvm/rubies/ruby-1.9.3-p0, this may take a while depending on your cpu(s)... ruby-1.9.3-p0 - #fetching ruby-1.9.3-p0 - #extracting ruby-1.9.3-p0 to /usr/share/ruby-rvm/src/ruby-1.9.3-p0 /usr/share/ruby-rvm/scripts/functions/utility: line 142: /usr/share/ruby-rvm/log/ruby- 1.9.3-p0/extract.log: Permission denied /usr/share/ruby-rvm/scripts/functions/utility: line 148: /usr/share/ruby-rvm/log/ruby- 1.9.3-p0/extract.log: Permission denied ERROR: Error running 'bunzip2 < '/usr/share/ruby-rvm/archives/ruby-1.9.3-p0.tar.bz2' | tar xf - -C /usr/share/ruby-rvm/tmp/rvm_src_23435', please read /usr/share/ruby- rvm/log/ruby-1.9.3-p0/extract.log ERROR: There has been an error while trying to extract the source. Halting the installation. ERROR: There has been an error fetching the ruby interpreter. Halting the installation. I tried to chmod the directories where I get access denied but it does not fix the problem. Any suggestions?
2
10,442,430
05/04/2012 03:47:14
310,291
03/02/2010 15:22:39
3,950
21
Transient Digital Certificate Toolkit in Java or C#?
Transient Digital Certificate is much used in some european countries as it simplifies certificate revocation list management but when searching I can't find much tech info. Is there any Transient Digital Certificate Toolkit in java or c# or how to implement them ?
c#
java
security
certificate
x509certificate
null
open
Transient Digital Certificate Toolkit in Java or C#? === Transient Digital Certificate is much used in some european countries as it simplifies certificate revocation list management but when searching I can't find much tech info. Is there any Transient Digital Certificate Toolkit in java or c# or how to implement them ?
0
1,619,604
10/25/2009 00:33:03
117,386
06/04/2009 14:23:52
86
7
Reading through file using ifstream
I am trying to read from file: The file is multiline and basically i need to go over each "word". Word being anything non space. Sample input file would be: <br> > Sample file: > test 2d<br> word 3.5<br> input<br> {<br><br> test 13.5 12.3<br> another {<br> testing 145.4 <br> } <br> } So I tried something like this: ifstream inFile(fajl.c_str(), ifstream::in); if(!inFile) { cout << "Cannot open " << fajl << endl; exit(0); } string curr_str; char curr_ch; int curr_int; float curr_float; cout << "HERE\n"; cin >> curr_str; cout << "Read " << curr_str << endl; The problem is when it reads new line it just hangs. I read everything before test 13.5 but once it reaches that line it doesnt do anything. Anyone can tell me what I am doing wrong? Any better suggestion on how to do this??? I essentially need to go through file and go one "word" (non white char) at the time. I Thanks
c++
ifstream
file
io
null
null
open
Reading through file using ifstream === I am trying to read from file: The file is multiline and basically i need to go over each "word". Word being anything non space. Sample input file would be: <br> > Sample file: > test 2d<br> word 3.5<br> input<br> {<br><br> test 13.5 12.3<br> another {<br> testing 145.4 <br> } <br> } So I tried something like this: ifstream inFile(fajl.c_str(), ifstream::in); if(!inFile) { cout << "Cannot open " << fajl << endl; exit(0); } string curr_str; char curr_ch; int curr_int; float curr_float; cout << "HERE\n"; cin >> curr_str; cout << "Read " << curr_str << endl; The problem is when it reads new line it just hangs. I read everything before test 13.5 but once it reaches that line it doesnt do anything. Anyone can tell me what I am doing wrong? Any better suggestion on how to do this??? I essentially need to go through file and go one "word" (non white char) at the time. I Thanks
0
9,653,499
03/11/2012 08:24:23
1,262,012
03/11/2012 08:19:41
1
0
Facebook page cover image pixelated horribly
I have designed a cover image for my new page with right dimensions , the problem is the resolution is really really bad especially when it comes to color GRADIENTS.... is there any guides/tricks to avoid that pixelation problem ???
facebook
design
photoshop
null
null
03/21/2012 12:38:58
off topic
Facebook page cover image pixelated horribly === I have designed a cover image for my new page with right dimensions , the problem is the resolution is really really bad especially when it comes to color GRADIENTS.... is there any guides/tricks to avoid that pixelation problem ???
2
8,824,703
01/11/2012 18:34:48
1,143,733
01/11/2012 17:19:17
1
0
something miss in my simple jquery plugin(i'm sorry for post this again)
Help me, just easy step to make my jquery plugins is works correctly... <br> I Will explain all here : http://wahyupentek.netii.net/Easy_Tab/Ver-1.2 my Full resourche : http://wahyupentek.netii.net/Easy_Tab/
jquery
jquery-ui
jquery-plugins
null
null
01/11/2012 23:31:33
not a real question
something miss in my simple jquery plugin(i'm sorry for post this again) === Help me, just easy step to make my jquery plugins is works correctly... <br> I Will explain all here : http://wahyupentek.netii.net/Easy_Tab/Ver-1.2 my Full resourche : http://wahyupentek.netii.net/Easy_Tab/
1
7,715,562
10/10/2011 16:02:43
340,947
05/14/2010 05:16:31
1,018
20
CSS Style property names -- going from the regular version to the JS property camelCase version and vice versa
Does there exist a provision for obtaining the corresponding names? A function I'm writing has to both set the style via `element.style[propnameCamelCase]` and retrieve the existing rendered value via `document.defaultView.getComputedStyle(element,'').getPropertyValue(propname_regular)`, and I can hardly justify having to pass two separate but semantically identical arguments to this function. I know that for most of them it's a fairly straightforward transcription between camelCase and underscore_delimited with the same words, so I can use regexes to convert them. But maybe there are a few that are not like this? Off the top of my head I'm having a hard time figuring out how to deal with the capitalized letters for camel case with regular expressions. **edit**: Ah, I could use a function for regex replace, each time I see an underscore, convert next letter to upper case.
javascript
css
null
null
null
null
open
CSS Style property names -- going from the regular version to the JS property camelCase version and vice versa === Does there exist a provision for obtaining the corresponding names? A function I'm writing has to both set the style via `element.style[propnameCamelCase]` and retrieve the existing rendered value via `document.defaultView.getComputedStyle(element,'').getPropertyValue(propname_regular)`, and I can hardly justify having to pass two separate but semantically identical arguments to this function. I know that for most of them it's a fairly straightforward transcription between camelCase and underscore_delimited with the same words, so I can use regexes to convert them. But maybe there are a few that are not like this? Off the top of my head I'm having a hard time figuring out how to deal with the capitalized letters for camel case with regular expressions. **edit**: Ah, I could use a function for regex replace, each time I see an underscore, convert next letter to upper case.
0
2,793,233
05/08/2010 07:04:21
1,427,536
03/09/2010 10:03:02
113
0
Should I learn about data structures & algorithms first or the programming language java first ?
I am a beginner to programming. Should I like learn them side by side ? Now that I know DS and Algorithms form the basis of programming..Should I learn them first ? I am confused. What should be my learning path ? I want to be a really good Java programmer.
java
data
structures
algorithms
null
01/28/2012 21:16:31
not constructive
Should I learn about data structures & algorithms first or the programming language java first ? === I am a beginner to programming. Should I like learn them side by side ? Now that I know DS and Algorithms form the basis of programming..Should I learn them first ? I am confused. What should be my learning path ? I want to be a really good Java programmer.
4
7,699,383
10/08/2011 19:52:45
612,266
02/10/2011 23:32:28
541
26
What Does the Code For a PHP Site Typically Look Like?
A friend and I have been working on a moderate-sized PHP website for some time now. Although we have both worked on and finished multiple small websites (in terms of amount of code), this is our first website that has required a very large amount of code. We have come up with our own site structure. So far, it has seemed to be working pretty well for us. **However**, we'd like to see some examples of what might be considered "good" PHP coding for a dynamic website. So, are there any possibly open-source examples of well coded PHP websites that we could take a look at? I think going over a bunch of code will help us come up with better ways to organize the code for our site.
php
coding-style
null
null
null
10/08/2011 23:36:58
not a real question
What Does the Code For a PHP Site Typically Look Like? === A friend and I have been working on a moderate-sized PHP website for some time now. Although we have both worked on and finished multiple small websites (in terms of amount of code), this is our first website that has required a very large amount of code. We have come up with our own site structure. So far, it has seemed to be working pretty well for us. **However**, we'd like to see some examples of what might be considered "good" PHP coding for a dynamic website. So, are there any possibly open-source examples of well coded PHP websites that we could take a look at? I think going over a bunch of code will help us come up with better ways to organize the code for our site.
1
7,886,991
10/25/2011 09:03:49
822,418
06/30/2011 06:00:23
6
0
how to convert &gt; and &lt; with "<" and ">" within a string if brackets are exist using regular expression
I want to replace &lt; with < and &gt; with > using regular expression if any these brackets or both the brackets exist in a string. so how do I check whether these brackets exist within a string with regular expression and replace any of them with < and > respectively.
jquery
null
null
null
null
null
open
how to convert &gt; and &lt; with "<" and ">" within a string if brackets are exist using regular expression === I want to replace &lt; with < and &gt; with > using regular expression if any these brackets or both the brackets exist in a string. so how do I check whether these brackets exist within a string with regular expression and replace any of them with < and > respectively.
0
7,861,150
10/22/2011 17:02:34
620,761
02/17/2011 04:40:54
174
3
jQuery Fade-In OnLoad?
Okay what I am simply looking for is a short/easy script that will allow me to replace the DIV name so that I can have multiple divs on a page fadein once loaded (including images within them). Any ideas? Thank you!
javascript
jquery
html
css
onload
null
open
jQuery Fade-In OnLoad? === Okay what I am simply looking for is a short/easy script that will allow me to replace the DIV name so that I can have multiple divs on a page fadein once loaded (including images within them). Any ideas? Thank you!
0