unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Javascript to save files in browser? === I generate html pages which are viewed locally. Is there a way i can use javascript to save files in a user designated folder? (like C:/dev/myapp/here) I looked at [HTML5 File API on MDN](https://developer.mozilla.org/en/Using_files_from_web_applications/) and see how to read files when a user selects them. No way to save files. I know how i can cache files by creating image tags but i like to generate a single button which will kick off a script to download a series of files (zip, gif, png, jpg). I dont suppose i can do that with javascript can i?
0
[ 2, 8247, 8741, 20, 2079, 6488, 19, 16495, 60, 800, 3726, 3726, 31, 7920, 13, 15895, 4434, 56, 50, 6084, 6680, 9, 25, 80, 21, 161, 31, 92, 275, 8247, 8741, 20, 2079, 6488, 19, 21, 4155, 3232, 19294, 60, 13, 5, 1403, 272, 45, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Getting errors while trying to build a skeleton Mule Cloud Connector.. === So I'm following the tutorials online to build a cloud connector but I can't even get the skeleton to be generated! [tutorial 1][1] [tutorial 2][2] I get the following error, using the create-cloud-connector.bat script given by the [Mule Cloud Connect Development Kit][3] > [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.170s [INFO] Finished at: Mon Jul 30 13:00:57 EDT 2012 [INFO] Final Memory: 7M/122M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.mule.tools:mule-cloud-connector-archetype:2.0.16) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [1]: http://www.mulesoft.org/documentation/display/MULE3USER/Using+the+Archetype [2]: http://blogs.mulesoft.org/build-your-cloud-connector-in-5-easy-steps/ [3]: http://www.mulesoft.org/documentation/display/MULE3USER/How+to+Build+a+Cloud+Connector what are some things I could be doing wrong? - I updated the Maven settings.xml file - the first question is " Name of the cloud service the new connector uses [default: ] " can I enter anything there? (or does it have to be like an existing service? what if I'm building one that doesn't exist?)
0
[ 2, 1017, 11908, 133, 749, 20, 1895, 21, 11714, 17857, 4005, 17991, 9, 9, 800, 3726, 3726, 86, 31, 22, 79, 249, 14, 29724, 18, 2087, 20, 1895, 21, 4005, 17991, 47, 31, 92, 22, 38, 166, 164, 14, 11714, 20, 44, 6756, 187, 636, 24...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
I can't change Window Title Color in new project for Android ADT 20 === My code: setTitleColor(Color.RED); don't work in new project created from ADT 20. But when I reopen old projects, this code work fine. Why? I delete from manifest Theme.Holo - don't work. How I can change Title color for new project?
0
[ 2, 31, 92, 22, 38, 753, 1463, 581, 1665, 19, 78, 669, 26, 13005, 21, 43, 38, 434, 800, 3726, 3726, 51, 1797, 45, 309, 22235, 11282, 5, 11282, 9, 2095, 6, 73, 221, 22, 38, 170, 19, 78, 669, 679, 37, 21, 43, 38, 434, 9, 47, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Activity moved to back starting activity === I find it difficult to start new activity using application staying in the background. Here is my code: public class App1 extends Activity{ public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.main); registerReceiver(batteryInfoReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); } private BroadcastReceiver batteryInfoReceiver = new BroadcastReceiver() { @Override public void onReceive(Context c, Intent i) { Toast.makeText(getApplicationContext(), "TEST", Toast.LENGTH_LONG).show(); Intent intent = new Intent("App2.intent.action.Launch"); intent.putExtra("startedByApp", true); startActivity(intent); } } @Override public void onBackPressed() { moveTaskToBack(true); } } public class App2 extends Activity{ public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.main); Toast.makeText(getApplicationContext(), "TEST 2", Toast.LENGTH_LONG).show(); } } When App1 is in the foreground it works fine. When App1 is in the background (moveToBack) it shows "TEST", but it doesn't start App2 (there is no "TEST 2" on my screen. Guys, can you help me?
0
[ 2, 2358, 385, 20, 97, 1422, 2358, 800, 3726, 3726, 31, 477, 32, 1956, 20, 799, 78, 2358, 568, 3010, 5725, 19, 14, 2395, 9, 235, 25, 51, 1797, 45, 317, 718, 4865, 165, 9073, 2358, 1, 317, 11364, 27, 6037, 1373, 5, 9930, 413, 43...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Linker Command Failed with exit code 1: duplicate symbol === ld: duplicate symbol _velocityX in /Users/Student/Library/Developer/Xcode/DerivedData/finalproject-ffzevekmatxvhrgisgeleoijyllr/Build/Intermediates/finalproject.build/Debug-iphonesimulator/finalproject.build/Objects-normal/i386/Level2ViewController.o and /Users/Student/Library/Developer/Xcode/DerivedData/finalproject-ffzevekmatxvhrgisgeleoijyllr/Build/Intermediates/finalproject.build/Debug-iphonesimulator/finalproject.build/Objects-normal/i386/Level1ViewController.o for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) I have no clue what is wrong with my project, can anyone help?
0
[ 2, 3508, 106, 1202, 1702, 29, 4350, 1797, 6352, 19429, 4678, 800, 3726, 3726, 13, 6252, 45, 19429, 4678, 13, 1, 195, 1415, 5788, 396, 19, 13, 118, 16704, 18, 118, 24822, 118, 1210, 2559, 622, 118, 26051, 106, 118, 396, 9375, 118, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Compiling with Android 4.X but supporting API Level 9 === I'm working on an application which uses ActionBarSherlock. As it's [documentation][1] points out: > [...] the library requires that **both it and your project are > compiled with Android 4.0 or newer.** The project also requires that > you are compiling with JDK 1.6 in both your editor and any build > systems that you may be using. So, that means I'll compile my application (and the library) against Android 4.X but in my Manifest, I declare that I'm targeting (e.g.) API Level 9. This all works fine and well but there is something that disturbs me. From the [FAQ][2]: > **What API level should I target in my manifest when using the library?** > > Targetting API level 11 or newer is required as it will cause Android > to automatically add the native action bar when run on newer devices. > Since you will be compiling against new APIs but your app will likely > be run on devices with older versions of Android **extra care must be > taken to either avoid using or properly check and call any methods > that were introduced after your minimum SDK version.** That means, that I'll have to *manually* check every method call, so I don't use any that are not available in my targeted API Level (9 in my case)? This sounds wrong to me. Is there a way to tell my IDE (IntelliJ), that I'm only using the API Level 9 (so I don't get any auto-completion for non-existing methods/classes and don't use them by accident) and then choose to compile it against another Android version? Or can I use some automated checks (which run at compile time) to check for that? [1]: http://actionbarsherlock.com/usage.html [2]: http://actionbarsherlock.com/faq.html
0
[ 2, 24378, 29, 13005, 268, 9, 396, 47, 3134, 21, 2159, 662, 561, 800, 3726, 3726, 31, 22, 79, 638, 27, 40, 3010, 56, 2027, 1028, 1850, 9161, 3966, 9, 28, 32, 22, 18, 636, 28132, 857, 500, 2558, 165, 500, 819, 70, 45, 13, 1, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Xcode 4.3 UIView setHidden not working === I am writing an app for the iphone and am attempting to create a view controller with two different views. So I have a subview created on top of the initial view in storyboard. I have created an outlet in the .h for the new view. I want to display the resultsView after the button is pressed so I have the view set to hidden in properties. @interface ViewController : UIViewController { UIView *resultsView; } @property (nonatomic, retain) IBOutlet UIView *resultsView; - (IBAction)buttonTapped:(id)sender; In my .m I have the following code #import "ViewController.h" @interface ViewController () @end @implementation ViewController @synthesize resultsView; - (IBAction)scanButtonTapped:(id)sender { [resultsView setHidden = NO]; } I have also tried resultsView.hidden = NO; Neither of these worked and I tried NSLog to retrieve the BOOL of resultsView.hidden and it was still YES.
0
[ 2, 993, 9375, 268, 9, 240, 13, 5661, 4725, 5610, 1340, 817, 52, 638, 800, 3726, 3726, 31, 589, 1174, 40, 4865, 26, 14, 21024, 17, 589, 6314, 20, 1600, 21, 1418, 9919, 29, 81, 421, 4146, 9, 86, 31, 57, 21, 972, 4725, 679, 27, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Validating XML output with map === I have a general problem solving problem. I'm trying to validate a SOAP request using Groovy through SOAP UI. I am receiving a number of attributes for a given item and need to validate each attribute in that item with corresponding column in a DB (i.e. if attribute size has value 4, i need to confirm the DB value under column 'size' has value 4). However, some attributes in the xml appear twice. When this happens, that means that the corresponding DB query has a multi-row reponse. At first I tried to create a map of the attributes to their values, but because there are multiple occurences of the same key, this became difficult. I'm not sure what the best datatype is, but i'd like to have something like the following: [attribute1 : ["red"], attribute2: ["purple","green"] ...] And be able to say something like, if attribute2 has more than one value assigned to it, loop through the multi-row DB reponse and look for that column's value and compare. Thanks, hope this is clear
0
[ 2, 7394, 1880, 23504, 5196, 29, 2942, 800, 3726, 3726, 31, 57, 21, 297, 1448, 17533, 1448, 9, 31, 22, 79, 749, 20, 7394, 1373, 21, 6447, 3772, 568, 3452, 2026, 93, 120, 6447, 13, 5661, 9, 31, 589, 3396, 21, 234, 16, 13422, 26, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there some in-site message(notification) framework by java? === I want to develop a notification feature in my website,but i unwilling to take a start from the head. Is there some open source framework about in-site notification?
1
[ 2, 25, 80, 109, 19, 8, 9097, 2802, 5, 1270, 4634, 6, 6596, 34, 8247, 60, 800, 3726, 3726, 31, 259, 20, 2803, 21, 52, 4634, 1580, 19, 51, 2271, 15, 811, 31, 14905, 20, 247, 21, 799, 37, 14, 157, 9, 25, 80, 109, 368, 1267, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
Confusion using MYSQLI === I just started using mysqli API for PHP. Apparently, every time an object of the class MYSQLI is instantiated, it can setup a connection to the database as it connects to the server unlike mysql_connect, which connects to the server first and then you are required to specify the database to query. Now this is a good problem if the db exists, in my case, the db does not exist on the first ever connection to the server/execution of the problem, hence I must connect without specifying the database, which is fine, since the msyqli constructor does not make this database mandatory. My challenge is essentially, how do I check if the database exists before attempting the first connection. The only way to really do this would be to establish a conection to the server and then use the result of the following query to gauge if the database exists: 'SELECT COUNT(*) AS `exists` FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMATA.SCHEMA_NAME="dbname' ; If this returns true, then the database exists, but now the challenge is how do I get the mysqli object to query this database rather than having to prefix the name of the database in the query. Thanks much
0
[ 2, 5677, 568, 51, 18, 1251, 1210, 800, 3726, 3726, 31, 114, 373, 568, 51, 18, 1251, 1210, 21, 2159, 26, 13, 26120, 9, 3083, 15, 352, 85, 40, 3095, 16, 14, 718, 51, 18, 1251, 1210, 25, 6322, 49, 1669, 15, 32, 92, 18161, 21, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Filtering element based on existence of child node === How would I select only `<li>` elements that have children `<a>` elements? <ul> <li><a href="#">Link 1</a></li> <li>Bullet</li> <li><a href="#">Link 2</a></li> <li><a href="#">Link 3</a></li> <li>Bullet</li> </ul>
0
[ 2, 25272, 4520, 432, 27, 3012, 16, 850, 15421, 800, 3726, 3726, 184, 83, 31, 5407, 104, 13, 1, 1210, 1, 2065, 30, 57, 391, 13, 1, 58, 1, 2065, 60, 13, 1, 1287, 1, 13, 1, 1210, 1, 58, 746, 14057, 3726, 7, 5910, 7, 1, 6258, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android: Starting a service on BOOTUP and then scheduling the service to run every 10 minutes? === I would like to have a service run on bootup and then scheduled to run every 10 minutes. Any ideas how i go about this? If on bootup can i force a schedule for 10 minutes, but i presume i would need to schedule this everytime on bootup because after a reboot all schedules are lost? Any help really appreciated thanks
0
[ 2, 13005, 45, 1422, 21, 365, 27, 6801, 576, 17, 94, 23096, 14, 365, 20, 485, 352, 332, 902, 60, 800, 3726, 3726, 31, 83, 101, 20, 57, 21, 365, 485, 27, 6801, 576, 17, 94, 3758, 20, 485, 352, 332, 902, 9, 186, 3478, 184, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Change navbar color in twitter bootstrap 2.0.4 === Good Afternoon, Was wondering if anyone knew how to change the navbar color in bootstrap v2.0.4 I tried this solution it does not seem to work: http://stackoverflow.com/questions/9869610/navbar-color-in-twitter-bootstrap Any other solutions? I have tried the customized bootstrap packages, but I am so far into development I can make a switch like that. Code: .navbar-inner { background-color: #2c2c2c; /* fallback color, place your own */ /* Gradients for modern browsers, replace as you see fit */ background-image: -moz-linear-gradient(top, #333333, #222222); background-image: -ms-linear-gradient(top, #333333, #222222); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222)); background-image: -webkit-linear-gradient(top, #333333, #222222); background-image: -o-linear-gradient(top, #333333, #222222); background-image: linear-gradient(top, #333333, #222222); background-repeat: repeat-x; /* IE8-9 gradient filter */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);}
0
[ 2, 753, 16048, 1850, 1665, 19, 10623, 5894, 16514, 172, 9, 387, 9, 300, 800, 3726, 3726, 254, 3435, 15, 23, 5712, 100, 1276, 404, 184, 20, 753, 14, 16048, 1850, 1665, 19, 5894, 16514, 566, 135, 9, 387, 9, 300, 31, 794, 48, 4295,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
In MySQL, how can I find all rows whose `attribute1` is the same as a particular row's `attribute1`? === In MySQL, how can I find all rows whose `attribute1` is the same as a particular row's `attribute1`? I thought about doing SELECT t1.id FROM t AS t1 , t AS t2 WHERE t2.id=123 AND t1.a=t2.a; but it has been running for eons.
0
[ 2, 19, 51, 18, 22402, 15, 184, 92, 31, 477, 65, 11295, 1196, 13, 1, 721, 14755, 165, 1, 25, 14, 205, 28, 21, 1498, 3131, 22, 18, 13, 1, 721, 14755, 165, 1, 60, 800, 3726, 3726, 19, 51, 18, 22402, 15, 184, 92, 31, 477, 65, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to pipe tail -f into awk === I'm trying to set up a script where an alert is generated when a certain string appears in a log file. The solution already in place greps the whole log file once a minute and counts how often the string appears, using the log line's timestamp to count only occurrences in the previous minute. I figured it would be much more efficient to do this with a tail, so I tried the following, as a test: FILENAME="/var/log/file.log" tail -f $FILENAME | awk -F , -v var="$HOSTNAME" ' BEGIN { failed_count=0; } /account failure reason/ { failed_count++; } END { printf("%saccount failure reason (Errors per Interval)=%d\n", var, failed_count); } ' but this just hangs and doesn't output anything. Somebody suggested this minor change: FILENAME="/var/log/file.log" awk -F , -v var="$HOSTNAME" ' BEGIN { failed_count=0; } /account failure reason/ { failed_count++; } END { printf("%saccount failure reason (Errors per Interval)=%d\n", var, failed_count); } ' <(tail -f $FILENAME) but that does the same thing. The awk I'm using (I've simplified in the code above) works, as it's used in the existing script where the results of *grep "^$TIMESTAMP"* are piped into it. My question is, how can get the tail -f to work with awk?
0
[ 2, 184, 20, 7642, 3424, 13, 8, 410, 77, 13, 3885, 197, 800, 3726, 3726, 31, 22, 79, 749, 20, 309, 71, 21, 3884, 113, 40, 7863, 25, 6756, 76, 21, 1200, 3724, 1780, 19, 21, 6738, 3893, 9, 14, 4295, 614, 19, 209, 5604, 1919, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Resource allocation using genetic algorithm and matlab === i am working in resource allocation problem, in this i have total 50000 resource and i want to distribulte it on 6 module. objective is f(i)=1-exp(-b(i)*w(i)); for i=1 to 6 g(i)=1+2*exp(-b(i)*w(i)); for i=1 to 6 ff=(c1-c2)*a(i)*v(i)*f(i)/g(i)+c2*a(i)+c3*w(i); for i=1 to 6 and a(i),b(i),c1,c2,c3 and v(i) is known and consrtaont is w(i)<=w whare i=1 to 6 w(i)>=0 and r(i)=1-exp(-b(i)*w(i))/1+2*exp(-b(i)*w(i))>=0.9; ie r(i) of each module is >= 0.9 so i need W(i) i=1 to 6 and total w is 50000. Please any one tell me how i will do using genetic algo. Thank You.
0
[ 2, 6577, 16840, 568, 6211, 9083, 17, 4277, 9086, 800, 3726, 3726, 31, 589, 638, 19, 6577, 16840, 1448, 15, 19, 48, 31, 57, 600, 1222, 3993, 6577, 17, 31, 259, 20, 1460, 13202, 255, 591, 32, 27, 400, 12613, 9, 7038, 25, 398, 5, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
currency regex with decimal === I need help: I want to validate in javascript my currency inputs that are in format: 1 234,78 (so there is space between 1000 and 2 decimals that are possible). Exemples: 50,25 50 1 150 1 150,44 1 000 001 1 000 001,25 Can you help me? Thanks
0
[ 2, 10507, 7953, 1706, 29, 26380, 800, 3726, 3726, 31, 376, 448, 45, 31, 259, 20, 7394, 1373, 19, 8247, 8741, 51, 10507, 6367, 18, 30, 50, 19, 2595, 45, 137, 13, 20404, 15, 4130, 13, 5, 656, 80, 25, 726, 128, 6150, 17, 172, 263...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
position absolute - div inside div not working === I have div callad subHeader inside I have: 1 - subHeaderLeft 2 - subHeaderRight when i displayed to browser the subHeaderLeft/right are out from subHeader and not inside. why the subHeaderLeft/right are out side from subHeader ? You can **[see Demo jsFiddle][1].** Thanks for any help. html code: <div id="subHeader"> <div id="subHeaderLeft"></div> <div id="subHeaderRight"></div> </div> css code: #subHeader{ width: 200px; height:100px; Helvetica, sans-serif; margin: 10px auto; border: 3px solid #6fb2e6; background: pink; } #subHeaderLeft{ position:absolute; left:0; top:0; width: 70px; height:100px; margin: 0; border: 3px solid #6fb2e6; background: white; } #subHeaderRight{ position:absolute; right:0; top:0; width: 30px; height:100px; margin: 0; border: 3px solid #6fb2e6; background: yellow; } ​ [1]: http://jsfiddle.net/centerwow/qjfUk/7/
0
[ 2, 649, 7070, 13, 8, 13, 12916, 572, 13, 12916, 52, 638, 800, 3726, 3726, 31, 57, 13, 12916, 645, 1283, 972, 1743, 106, 572, 31, 57, 45, 137, 13, 8, 972, 1743, 106, 9742, 172, 13, 8, 972, 1743, 106, 4183, 76, 31, 6115, 20, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Image blending modes for HDR images === The blending modes Screen, Color Dodge, Soft Light, etc. like in Photoshop, each have their own math that works for range 0-1. I wonder how do these blend modes work for HDR images? Thanks
0
[ 2, 1961, 25359, 12770, 26, 8590, 139, 3502, 800, 3726, 3726, 14, 25359, 12770, 2324, 15, 1665, 9441, 15, 1856, 471, 15, 2722, 9, 101, 19, 7064, 5347, 15, 206, 57, 66, 258, 5057, 30, 693, 26, 978, 713, 8, 165, 9, 31, 2666, 184, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
I keep getting this error on logging out of facebook, on an android application === I created a app, which user facebook authentication. But as soon as I minimizes and then resumes and try to log out of facebook, it throws the following error. 07-13 16:35:42.989: E/AndroidRuntime(23464): FATAL EXCEPTION: Thread-47 07-13 16:35:42.989: E/AndroidRuntime(23464): android.database.sqlite.SQLiteDiskIOException: error code 10: disk I/O error 07-13 16:35:42.989: E/AndroidRuntime(23464): at android.database.sqlite.SQLiteStatement.native_execute(Native Method) 07-13 16:35:42.989: E/AndroidRuntime(23464): at android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:61) 07-13 16:35:42.989: E/AndroidRuntime(23464): at android.database.sqlite.SQLiteDatabase.delete(SQLiteDatabase.java:1632) 07-13 16:35:42.989: E/AndroidRuntime(23464): at android.webkit.WebViewDatabase.clearCookies(WebViewDatabase.java:543) 07-13 16:35:42.989: E/AndroidRuntime(23464): at android.webkit.CookieSyncManager.clearAllCookies(CookieSyncManager.java:128) 07-13 16:35:42.989: E/AndroidRuntime(23464): at android.webkit.CookieManager$2.run(CookieManager.java:532) 07-13 16:35:42.989: E/AndroidRuntime(23464): at java.lang.Thread.run(Thread.java:1019)
0
[ 2, 31, 643, 1017, 48, 7019, 27, 13, 13919, 70, 16, 9090, 15, 27, 40, 13005, 3010, 800, 3726, 3726, 31, 679, 21, 4865, 15, 56, 4155, 9090, 27963, 9, 47, 28, 651, 28, 31, 16713, 18, 17, 94, 13113, 18, 17, 1131, 20, 6738, 70, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
configuration structuremap for multiple implementations in different projects === I have 4 libraries projects: 1. Interfaces - define interfaces 2. ExerAImplementations - define implementations for excercise A to the interfaces 3. ExerBImplementations - define implementations for excercise B to the interfaces Interfaces project has the following interface: public interface ICounter { .... .... } Excercise A implement its ICounter interface: `public class ExcerACounter:ICounter {....}` Excercise B implement its ICounter interface: `public class ExcerBCounter:ICounter {....}` Now I would like to configure structure map. How can I configure in structure map the implementation that relate to the same project (If class from excercise A needs ICounter, how can I configure structuremap so that it will get implementation of excercise A and class from excercise B will get implementation of exercise B)?
0
[ 2, 8091, 1411, 15022, 26, 1886, 6123, 18, 19, 421, 2314, 800, 3726, 3726, 31, 57, 268, 8649, 2314, 45, 137, 9, 6573, 18, 13, 8, 9267, 6573, 18, 172, 9, 1396, 2615, 8983, 413, 1130, 7504, 13, 8, 9267, 6123, 18, 26, 1396, 5482, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to access attribute values from HTML to save in DB on button click === i am writing some adding some link attribute like below. which render to HTML, but i want to knwo i can i acess those attributes value at button click event? My code is below protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) { if (e.Item is GridDataItem) { GridDataItem gridDataItem = (GridDataItem)e.Item; gridDataItem.Height = Unit.Pixel(10); HyperLink link = (HyperLink)gridDataItem["ContentTitle"].Controls[0]; ViewState["ContentID"] = gridDataItem["ContentID"].Text; link.ForeColor = System.Drawing.Color.Navy; link.ToolTip = Common.grdTextCell(gridDataItem["ContentSummaryDescr"].Text); link.NavigateUrl = "~/SlideImages/" + gridDataItem["ContentName"].Text;//Session["contentFolderPath"] + "\\"+ gridDataItem["ContentName"].Text;// Common.grdTextCell(gridDataItem["ContentName"].Text); link.Target = "_blank"; link.Attributes["name"] = gridDataItem["ContentID"].Text + "," + gridDataItem["SiteContentListID"].Text; HttpResponse myHttpResponse = Response; HtmlTextWriter myHtmlTextWriter = new HtmlTextWriter(myHttpResponse.Output); link.Attributes.AddAttributes(myHtmlTextWriter); link.Attributes.Add("onclick", "document.getElementById('" + dummyBtn.ClientID + "').click();"); } } protected void dummyBtn_Click(object sender, EventArgs e) { } rendered HTML is like this.. I am writing this for one row <td><a style="color:Navy;" target="_blank" href="SlideImages/abc.doc" onclick="document.getElementById('MainContent_SiteNewCon_dummyBtn').click();" name="1,16" title="rupesh tesr">rupesh test</a></td> i want to use thses name="1, 16" to my button click event so that i can save them to db.
0
[ 2, 184, 20, 1381, 35, 14755, 4070, 37, 13, 15895, 20, 2079, 19, 13, 9007, 27, 5167, 10840, 800, 3726, 3726, 31, 589, 1174, 109, 4721, 109, 3508, 35, 14755, 101, 1021, 9, 56, 16535, 20, 13, 15895, 15, 47, 31, 259, 20, 6209, 6374,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
KML/Google Earth: Model as " 3d Icon", Zoom independent === I've difficulties to explain, what I want, but it is basically a 3d model used as an icon in Google Earth, something that stays alyways the same size as you zoom in and out, just like the 2d icons do. I might try the regions tag, defining different sized models for every zoom level, but that sounds unsmooth. Is there a more direct way? Thanks! Bernhard
0
[ 2, 401, 255, 118, 16111, 4875, 1073, 45, 1061, 28, 13, 7, 203, 43, 9801, 7, 15, 19469, 1124, 800, 3726, 3726, 31, 22, 195, 8075, 20, 3271, 15, 98, 31, 259, 15, 47, 32, 25, 11374, 21, 203, 43, 1061, 147, 28, 40, 9801, 19, 814...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What does the GCC error message, "Error: unsupported for `mov'", mean? === I am just trying to compile some simple example code I typed in from a book, and GCC gives me the above error. Here's my code: #define READ_COMMAND 3 #define MSG_LENGTH 128 #include <stdlib.h> #include <stdio.h> int main(int argc, char *arg[]) { int syslog_command = READ_COMMAND; int bytes_to_read = MSG_LENGTH; int retval; char buffer[MSG_LENGTH]; asm volatile( "movl %1, %%ebx\n\t" "movl %2, %%ecx\n\t" "movl %3, %%edx\n\t" "movl $103, %%eax\n\t" "int $128\n\t" "movl %%eax, %0" :"=r" (retval) :"m"(syslog_command),"r"(buffer),"m"(bytes_to_read) :"%eax","%ebx","%ecx","%edx"); if (retval > 0) printf("%s\n", buffer); } The code is supposed to invoke the syslog() system call to read the last 128 bytes from the kernel printk() ring buffer. Here is some information about my OS and system configuration: uname -a Linux 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
0
[ 2, 98, 630, 14, 489, 3384, 7019, 2802, 15, 13, 7, 29992, 45, 367, 24909, 26, 13, 1, 15146, 22, 7, 15, 884, 60, 800, 3726, 3726, 31, 589, 114, 749, 20, 26561, 109, 1935, 823, 1797, 31, 1001, 43, 19, 37, 21, 360, 15, 17, 489, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
inline javascript: can it retrieve reference to the element it was invoked from? === On basically any element you can put a `onclick='func()'` or some such to run JS when interacted with. Is there any way to get a reference to the DOM element itself? When i do the obvious thing: ` <input type='button' onclick='alert(self);' />` I get `[Object DOMWindow]`, which isn't quite as convenient as I'd hoped. I realize I can easily hack my way through it by using id's or classes. But that means for each new custom-code button i create I must ensure it has a unique self referencing id, which I'd like to do without because that is more difficult to maintain.
0
[ 2, 19, 1143, 8247, 8741, 45, 92, 32, 11917, 2801, 20, 14, 4520, 32, 23, 26252, 37, 60, 800, 3726, 3726, 27, 11374, 186, 4520, 42, 92, 442, 21, 13, 1, 218, 150, 10129, 3726, 22, 16638, 150, 5, 6, 22, 1, 54, 109, 145, 20, 485,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SOCKET does not name a type === As the question says, I am having an issue with the following code: #pragma once #include "includes.h" #include "buffer.h" class CSocket { bool udp; int format; char formatstr[30]; static sockaddr SenderAddr; int receivetext(char*buf, int max); public: SOCKET sockid; CSocket(SOCKET sock); CSocket(); ~CSocket(); bool tcpconnect(char*address, int port, int mode); bool tcplisten(int port, int max, int mode); CSocket* tcpaccept(int mode); char* tcpip(); void setnagle(bool enabled); bool tcpconnected(); int setsync(int mode); bool udpconnect(int port, int mode); int sendmessage(char*ip, int port, CBuffer* source); int receivemessage(int len, CBuffer*destination); int peekmessage(int size, CBuffer*destination); int lasterror(); static char* GetIp(char*address); static int SockExit(void); static int SockStart(void); static char* lastinIP(void); static unsigned short lastinPort(void); static char* myhost(); int SetFormat(int mode, char* sep); }; I am using Code::Blocks. I'm getting the following error at build time: /home/nick/Desktop/39dylibsource/Base Code/39dll/socket.h|15|error: ‘SOCKET’ does not name a type| /home/nick/Desktop/39dylibsource/Base Code/39dll/socket.h|16|error: expected ‘)’ before ‘sock’| /home/nick/Desktop/39dylibsource/Base Code/39dll/main.cpp|16|error: expected constructor, destructor, or type conversion before ‘(’ token| /home/nick/Desktop/39dylibsource/Base Code/39dll/main.cpp|25|error: expected constructor, destructor, or type conversion before ‘(’ token| /home/nick/Desktop/39dylibsource/Base Code/39dll/main.cpp|34|error: expected constructor, destructor, or type conversion before ‘(’ token| /home/nick/Desktop/39dylibsource/Base Code/39dll/main.cpp|43|error: expected constructor, destructor, or type conversion before ‘(’ token| /home/nick/Desktop/39dylibsource/Base Code/39dll/main.cpp|50|error: expected constructor, destructor, or type conversion before ‘(’ token| /home/nick/Desktop/39dylibsource/Base Code/39dll/main.cpp|59|error: expected constructor, destructor, or type conversion before ‘(’ token| /home/nick/Desktop/39dylibsource/Base Code/39dll/main.cpp|66|error: expected constructor, destructor, or type conversion before ‘(’ token| /home/nick/Desktop/39dylibsource/Base Code/39dll/main.cpp|74|error: expected constructor, destructor, or type conversion before ‘(’ token| /home/nick/Desktop/39dylibsource/Base Code/39dll/main.cpp|85|error: expected constructor, destructor, or type conversion before ‘(’ token| ||=== Build finished: 11 errors, 0 warnings ===| I have included the following in the referenced includes.h: #include <sys/socket.h> #include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> Am i missing a directive or library? Is SOCKET spelled different? Any illumination would be great!
0
[ 2, 18482, 630, 52, 204, 21, 1001, 800, 3726, 3726, 28, 14, 1301, 898, 15, 31, 589, 452, 40, 1513, 29, 14, 249, 1797, 45, 6926, 7310, 14336, 382, 6926, 22640, 13, 7, 22640, 18, 9, 252, 7, 6926, 22640, 13, 7, 2345, 6866, 9, 252,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Calling out a form within a form (PHP) === I'm trying to call out a form within a form where the second form action does not work. It didn't parse. My sample program have one main form which is attached to my submit button and inner form would be a download button. $T = "./staff.docx"; <form id="Staff" name="Staff" method="post" action="gotonextpage.php"> //Inner download button <?php $fullPath = $_SERVER['DOCUMENT_ROOT']."/doc/store"."$T"; echo "<form name=\"download\" action=\"download.php\" method=\"post\">"; echo "<input type=\"hidden\" name=\"fullPath\" value=\"$fullPath\"/>"; echo "<input type=\"submit\" name=\"submit\" value=\"Download\"/>"; echo "</form>"; ?> <input type="submit" name="Submit" value='Submit'> </form> Kindly advise. Thanks!
0
[ 2, 2555, 70, 21, 505, 363, 21, 505, 13, 5, 26120, 6, 800, 3726, 3726, 31, 22, 79, 749, 20, 645, 70, 21, 505, 363, 21, 505, 113, 14, 153, 505, 1028, 630, 52, 170, 9, 32, 223, 22, 38, 2017, 870, 9, 51, 5717, 625, 57, 53, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
optimizing load time of page containing a lot of product images === Please forgive my ignorance, I have somewhat theoretical question. I'm building a search engine for products. I'm scrapping shopping websites and harvesting their products info as well as the product image. My question is, in terms of page load time is it better to download their images, store them on my server and then load them from my server? or is it better to just save the images original URLs and then load the images from their original location. Please assume that my server is probably less efficient and quick as the original shopping websites. thanks in advance.
0
[ 2, 19259, 3335, 6305, 85, 16, 2478, 3503, 21, 865, 16, 2374, 3502, 800, 3726, 3726, 2247, 8591, 51, 20949, 15, 31, 57, 4131, 9482, 1301, 9, 31, 22, 79, 353, 21, 2122, 1406, 26, 1985, 9, 31, 22, 79, 10241, 3181, 4884, 13931, 17, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
NUnit DLL revision mismatch === I'm having this weird revision mismatch error. All my NUnit test projects used to work with NUnit 2.5.7, but now that I switched them to using NUnit v2.5.10, I keep on getting the following error: > FileLoadException: Could not load file or assembly 'nunit.framework, version 2.5.7... *Note: I cleaned up, rebuilt, double checked the references, no problem there.* Using the Assembly Binder Log Viewer (see below), it seems to me that the trigger of this error is the Spring.Testing.NUnit.dll... which seems weird given that the [Spring.Testing.Nunit 1.3.2 Nuget page][1] says in its Dependency List: **NUnit (≥ 2.5.7)** Any idea what I'm missing here? Thanks in advance, TB. >Assembly Binder Log Entry (02.07.2012 @ 16:06:35) >The operation failed. >Bind result: hr = 0x80131040. No description available. > Assembly manager loaded from: > C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll Running under > executable > F:\robin\4-Development\Workspace\3rdParty\NUnit\2.5.10\nunit-agent.exe > --- A detailed error log follows. > > === Pre-bind state information === LOG: User = Mth\tbourguignon LOG: DisplayName = nunit.framework, Version=2.5.7.10213, > Culture=neutral, PublicKeyToken=96d09a1eb7f44a77 (Fully-specified) > LOG: Appbase = file:///F:/robin/4-Development/Workspace/Application > LOG: Initial PrivatePath = > Rh.Robin.Common.Tests\bin\Debug;Rh.Robin.Service.Test\bin\Debug;Rh.Robin.Domain.Unit.Test\bin\Debug;Rh.Robin.Service.Unit.Test\bin\Debug;Rh.Robin.Web.UI.MVC.Unit.Test\bin\Debug > LOG: Dynamic Base = NULL LOG: Cache Base = > C:\Users\tbourguignon.Mth\AppData\Local\Temp\nunit20\ShadowCopyCache\4980_634768419945070499 > LOG: AppName = Tests_29030132 Calling assembly : **Spring.Testing.NUnit, > Version=1.3.2.40943**, Culture=neutral, PublicKeyToken=65e474d141e25e07. > === LOG: This bind starts in default load context. LOG: No application configuration file found. LOG: Using host configuration file: LOG: > Using machine configuration file from > C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. > LOG: Post-policy reference: **nunit.framework, Version=2.5.7.10213**, > Culture=neutral, PublicKeyToken=96d09a1eb7f44a77 LOG: GAC Lookup was > unsuccessful. LOG: Attempting download of new URL > file:///F:/robin/4-Development/Workspace/Application/nunit.framework.DLL. > LOG: Attempting download of new URL > file:///F:/robin/4-Development/Workspace/Application/nunit.framework/nunit.framework.DLL. > LOG: Attempting download of new URL > file:///F:/robin/4-Development/Workspace/Application/Rh.Robin.Common.Tests/bin/Debug/nunit.framework.DLL. > LOG: Assembly download was successful. Attempting setup of file: > F:\robin\4-Development\Workspace\Application\Rh.Robin.Common.Tests\bin\Debug\nunit.framework.dll > LOG: Entering download cache setup phase. LOG: **Assembly Name is: > nunit.framework, Version=2.5.10.11092**, Culture=neutral, > PublicKeyToken=96d09a1eb7f44a77 WRN: Comparing the assembly name > resulted in the mismatch: Revision Number **ERR: The assembly reference > did not match the assembly definition found**. ERR: Setup failed with hr > = 0x80131040. ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated. [1]: http://nuget.org/packages/Spring.Testing.NUnit/1.3.2
0
[ 2, 10210, 242, 13, 43, 211, 11323, 2462, 12280, 800, 3726, 3726, 31, 22, 79, 452, 48, 5455, 11323, 2462, 12280, 7019, 9, 65, 51, 10210, 242, 1289, 2314, 147, 20, 170, 29, 10210, 242, 172, 9, 264, 9, 465, 15, 47, 130, 30, 31, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Comment Opening and Closing Brackets (with ReSharper?) === Does anyone know if there's a way in Visual Studio 2010 with ReSharper 6.1 to comment out the selected lines of code with their closing brackets - or simply to comment out both the highlighted opening bracket and it's corresponding closing bracket? Here's an example of what I mean: if(something) { do(this); } I am looking for a hot-key so that when `if(something) {` is selected, it will comment out `if(something) {` and `}`, preferably fixing the tabs once commented like so: // if(something) { do(this); //}
0
[ 2, 6484, 1214, 17, 4239, 21971, 13, 5, 1410, 302, 23646, 106, 60, 6, 800, 3726, 3726, 630, 1276, 143, 100, 80, 22, 18, 21, 161, 19, 3458, 1120, 498, 29, 302, 23646, 106, 400, 9, 165, 20, 6484, 70, 14, 1704, 1560, 16, 1797, 29,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to insert current time in the emacs org-mode === Is there a simple way to insert the current time (like TIME: [2012-07-02 Mon 16:44]) in the org-mode? In the manual there is a lot of stuff (clocks, deadlines, schedules), but most of them require entering the time manually.
0
[ 2, 184, 20, 14692, 866, 85, 19, 14, 13, 62, 6893, 18, 13, 5583, 8, 15570, 800, 3726, 3726, 25, 80, 21, 1935, 161, 20, 14692, 14, 866, 85, 13, 5, 1403, 85, 45, 636, 3212, 8, 2984, 8, 3564, 3521, 347, 21286, 500, 6, 19, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
removeOverlay:overlay not working Xcode === I'm a new guy in the XCODE realm and was wondering if someone could help me out. Essentially, I'm playing around with WWDC2010's TileMap project example and am trying to figure out a way to hide their NOAA chart using a segmented controller. I can activate the overlay and it displays fine, but I can't for the life of me remove it using a segmented controller. Here's some code from the header file: `@interface ViewController : UIViewController <MKMapViewDelegate> { IBOutlet MKMapView *map; IBOutlet UISegmentedControl *controller;} - (IBAction)switchMap:(id)sender; @end ` and here's the code for the .m: - (void)viewDidLoad { [super viewDidLoad]; NSLog(@"initial view loaded"); } - (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id)overlay { TileOverlayView *view = [[TileOverlayView alloc] initWithOverlay:overlay]; view.tileAlpha = 1; return view; } - (void)viewDidUnload { [super viewDidUnload]; // Release any retained subviews of the main view. } - (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); } - (IBAction)switchMap:(id)overlay { if (controller.selectedSegmentIndex == 0) { NSLog(@"welp... it loaded..."); [map removeOverlay:overlay]; } if (controller.selectedSegmentIndex == 1) { NSLog(@"Map Overlay works"); NSString *tileDirectory = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Tiles"]; TileOverlay *overlay = [[TileOverlay alloc] initWithTileDirectory:tileDirectory]; [map addOverlay:overlay]; MKMapRect visibleRect = [map mapRectThatFits:overlay.boundingMapRect]; visibleRect.size.width /= 2; visibleRect.size.height /= 2; visibleRect.origin.x += visibleRect.size.width / 2; visibleRect.origin.y += visibleRect.size.height / 2; map.visibleMapRect = visibleRect; } if (controller.selectedSegmentIndex == 2) { NSLog(@"But... overlay isnt hiding waa"); NSString *tileDirectory = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Tiles"]; TileOverlay *overlay = [[TileOverlay alloc] initWithTileDirectory:tileDirectory]; [map removeOverlay:overlay]; } } Thanks guys, any suggestions would be much appreciated!
0
[ 2, 4681, 2549, 4414, 45, 2549, 4414, 52, 638, 993, 9375, 800, 3726, 3726, 31, 22, 79, 21, 78, 1244, 19, 14, 993, 9375, 6640, 17, 23, 5712, 100, 737, 110, 448, 55, 70, 9, 7398, 15, 31, 22, 79, 791, 140, 29, 13, 14178, 7201, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Extern or extrn in B? === I have a confusion between two B keywords. The official B reference manual uses `extrn` keyword, while Wikipedia and C use `extern`. As I don't know any good B compiler for x86, I can't spellcheck using a compiler. So, what's the correct way of writing extern keyword in B - `extern` or `extrn`?
0
[ 2, 1396, 8766, 54, 1396, 38, 5778, 19, 334, 60, 800, 3726, 3726, 31, 57, 21, 5677, 128, 81, 334, 1246, 12827, 9, 14, 989, 334, 2801, 5132, 2027, 13, 1, 1706, 38, 5778, 1, 1246, 9587, 15, 133, 20169, 17, 272, 275, 13, 1, 1706, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Saving filenames on Access Database === So i need some help please =) Im doing a Java project in Netbeans, the objective is to read several file names on a folder (which i already can do) that look like this: **037-The Setting Sun-Dave Gilad-JAN2012-45.52-Landscapes.jpg** and store them on an Access DB. i need to split the name without "-", to put on DB on the right column (ID, NAME, AUTHOR, DATE, ETC...). The problem is that i can't split the file name, only get the names, and i don't know how to properly save the on the table (I already have the table created). This is the function to connect to database: public Connection con; public Statement stm; public ResultSet rs; public void Conectar(){ //JOptionPane.showMessageDialog(null, "Preparing for connection;"); try { /* Try connection to driver */ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); } catch (ClassNotFoundException e) { JOptionPane.showMessageDialog(null, "Can´t load the driver."); System.exit(0); } try { /* Name of database */ con = DriverManager.getConnection("jdbc:odbc:FileOrg"); stm = con.createStatement(); } catch (SQLException sqle) { JOptionPane.showMessageDialog(null, "Problem on connection!"); System.exit(0); } //JOptionPane.showMessageDialog(null, "Connection Successfull!"); } I can´t get past here: private void ActualizerBDActionPerformed(java.awt.event.ActionEvent evt) { Conectar(); String ppp = new File(".").getCanonicalPath(); File folder = new File(ppp + "\\ImagensDB"); File[] listOfFiles = folder.listFiles(); }
0
[ 2, 7599, 3893, 7259, 18, 27, 1381, 6018, 800, 3726, 3726, 86, 31, 376, 109, 448, 2247, 800, 6, 797, 845, 21, 8247, 669, 19, 4275, 863, 5950, 15, 14, 7038, 25, 20, 1302, 238, 3893, 1817, 27, 21, 19294, 13, 5, 2140, 31, 614, 92,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Retrieve Javascripts variables in Rails using Ajax === I got some trouble, I have no idea how to use Ajax in order to retrieve a javascript variable. Here is the code, I think you will understand what I mean %form{:name => "widget"} %input{:name => "color", :onclick => "ob()", :type => "radio"} Bleu/Orange %input{:name => "color", :onclick => "bo()", :type => "radio"} Bleu/Orange %script{:Language => "javascript"} function ob() { var ojblue = 1; } function bo() { var ojblue = 2; } = link_to("Edit", "#ojblue", :class => 'btn btn-info', :'data-toggle' => "modal") So I'm trying to retrieve the "ojblue" value; After many searches, I know I have to use Ajax or Jquery, and the only tip I know is to use the "remote_function" method, but I don't know how to handle that... Thanks you very much
0
[ 2, 11917, 8247, 8741, 18, 12157, 19, 2240, 18, 568, 20624, 800, 3726, 3726, 31, 330, 109, 2572, 15, 31, 57, 90, 882, 184, 20, 275, 20624, 19, 389, 20, 11917, 21, 8247, 8741, 7612, 9, 235, 25, 14, 1797, 15, 31, 277, 42, 129, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Zend YouTube API supporting captions? === I'm trying to retrieve/post captions to YouTube using Zend. When I examine the video feed, $feed = $youTubeService->getVideoFeed('https://gdata.youtube.com/feeds/users/default/uploads'); print_r($feed); (which is part of the samples they have for uploading and retrieving videos), the captions protocol in the API (https://developers.google.com/youtube/2.0/developers_guide_protocol_captions) tells me I should see http://gdata.youtube.com/schemas/2007#video.captionTracks somewhere in the result. But I don't. Is Zend not supporting it? Or am I missing something? The video in question does have captions. Thanks!
0
[ 2, 10526, 43, 7330, 21, 2159, 3134, 26622, 18, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 11917, 118, 6962, 26622, 18, 20, 7330, 568, 10526, 43, 9, 76, 31, 9691, 14, 763, 4063, 15, 5579, 20954, 800, 5579, 245, 19302, 11449, 8, 1,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
struts 2 reset is not working with jquery plugin === I'm using struts 2 with jquery plugin for date picker. when mouse over the date picker, it is showing "..."(3 dots) by default.when i tried to change it , No use.. And i set display format as dd/mm/yy.But when i press reset button, it is showing some other format.. My code is.. <%@ taglib prefix="sj" uri="/struts-jquery-tags"%> <sj:datepicker id="fromDate" name="searchBean.fromDate" maxDate="new Date()" changeMonth="true" changeYear="true" buttonImageOnly="true" onCompleteTopics="onDpClose" cssStyle="width: 134px; margin-right:5px;" displayFormat="dd/mm/yy" disabled="true" /> I'm in confusion state.Why it is behaving like that? Any Idea? Laxman Chowdary
0
[ 2, 18316, 18, 172, 23422, 25, 52, 638, 29, 487, 8190, 93, 10922, 108, 800, 3726, 3726, 31, 22, 79, 568, 18316, 18, 172, 29, 487, 8190, 93, 10922, 108, 26, 1231, 2036, 106, 9, 76, 7567, 84, 14, 1231, 2036, 106, 15, 32, 25, 3187...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Audio distorted when playing flash === When I open a video/audio track with my browser (Firefox or Chrome), the sound is very distorted. However this doesn't happen when opening a media file or something that runs with Java, so I believe is a Flash problem. I've tried uninstalling flash and re-installing Chrome and Firefox, but the problem persists. The flash version I'm currently using is 11,3,300,257. I'm using Windows XP.
0
[ 2, 4023, 21414, 76, 791, 4433, 800, 3726, 3726, 76, 31, 368, 21, 763, 118, 1346, 6921, 792, 29, 51, 16495, 13, 5, 5929, 18219, 54, 13, 12985, 6, 15, 14, 646, 25, 253, 21414, 9, 207, 48, 1437, 22, 38, 2384, 76, 1214, 21, 941, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Which values should be put in quotation marks and which not in jQuery's animation === I was wondering in which cases one should put the values of an animation in quotation marks. [jQuery][1]'s site doesn't really explains when. I figured it would be when you are giving a unit value: for instance `"52px"` or `"1em"` whereas opacity is unit-less (`0.9`) I don't know what to do with things such as `borderStyle`, `backgroundColor`, `boxShadow`, `backgroundImage` though and I can't seem to find any examples. Any help and guidelines would be appreciated! [1]: http://api.jquery.com/animate/
0
[ 2, 56, 4070, 378, 44, 442, 19, 22786, 4872, 17, 56, 52, 19, 487, 8190, 93, 22, 18, 6236, 800, 3726, 3726, 31, 23, 5712, 19, 56, 1871, 53, 378, 442, 14, 4070, 16, 40, 6236, 19, 22786, 4872, 9, 636, 728, 8190, 93, 500, 2558, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
No route found for "GET /user/register": Method Not Allowed (Allow: POST) === When i go to : `http://mysite.com/web/app_dev.php/user/register` I am getting: MethodNotAllowedHttpException: No route found for "GET /user/register": Method Not Allowed (Allow: POST) Here is my code: MainUserBundle_register: pattern: /user/register/ defaults: { _controller: MainUserBundle:UserAuthWebService:register, _format:json} requirements: _method: POST my controller is: public function registerAction($email="test", $username="test", $password="test123") { //some code } Why?
0
[ 2, 90, 858, 216, 26, 13, 7, 3060, 13, 118, 16704, 118, 12463, 9959, 7, 45, 2109, 52, 1159, 13, 5, 17976, 45, 678, 6, 800, 3726, 3726, 76, 31, 162, 20, 13, 45, 13, 1, 21127, 6903, 915, 9097, 9, 960, 118, 14113, 118, 7753, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Netbeans 7.1.2 - project source folders in a tree (hierarchical) view, rather then a flat view? === How can I get a tree view for Netbeans 7.1.2 ? The FAQ http://wiki.netbeans.org/FaqTreePackageView appears to be for older versions of Netbeans. Thanks.
0
[ 2, 4275, 863, 5950, 453, 9, 165, 9, 135, 13, 8, 669, 1267, 19294, 18, 19, 21, 1541, 13, 5, 18094, 8027, 4272, 6, 1418, 15, 864, 94, 21, 1844, 1418, 60, 800, 3726, 3726, 184, 92, 31, 164, 21, 1541, 1418, 26, 4275, 863, 5950, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Eclipse gets closed once it opens the home window in windows 7 === I have been eclipse for a long time. Just today I opened the Eclipse as usual and it is asking the workspace folder then it is loading and showing the home window but getting closed immediately. I checked the .metadata folder of the workspace for Log file. But I did not see any log file there. I am using latest eclipse-Juno x64 version on windows 7. Please someone help me out. thanks
0
[ 2, 11652, 3049, 827, 382, 32, 8965, 14, 213, 1463, 19, 1936, 453, 800, 3726, 3726, 31, 57, 74, 11652, 26, 21, 175, 85, 9, 114, 786, 31, 520, 14, 11652, 28, 3820, 17, 32, 25, 3379, 14, 170, 5582, 19294, 94, 32, 25, 12797, 17, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
classCastException on getExtra() from a Parcelable Object in a Service === I'm trying to implement a Service and I have a classCastException in my Service. Since Location isn't Parcelable I wrap it in a ParcelableArrayList. public class GPSService extends Service { public void setLocation(Location location) { ArrayList<Location> locationArrayList = new ArrayList<Location>(1); locationArrayList.add(location); Bundle b = new Bundle(); b.putParcelableArrayList("location", locationArrayList); // try with an arrayList instead of just getExtra doesn't change anything :( ArrayList<GPSResultReceiver> resultReceiverArrayList = intent.getParcelableArrayListExtra("receiver"); // this is a resultReceiver and not a GPSResultReceiver // where did the upcast happen? GPSResultReceiver receiver = resultReceiverArrayList.get(0); Log.d("ResultClass", receiver.getClass().toString()); receiver.onReceiveResult(1111, b); } My Activity looks as following: public class MyActivity extends Activity implements GPSResultReceiver.Receiver { void startService() { resultReceiver = new GPSResultReceiver(new Handler()); resultReceiver.setReceiver(this); final Intent intent = new Intent(Intent.ACTION_SEND, null, this, GPSService.class); // intent.putExtra("receiver", resultReceiver); ArrayList<GPSResultReceiver> resultReceiverArrayList = new ArrayList<GPSResultReceiver>(1); resultReceiverArrayList.add(resultReceiver); intent.putParcelableArrayListExtra("receiver", resultReceiverArrayList); serviceRunning = true; startService(intent); } My GPSResultReceiver: public class GPSResultReceiver extends ResultReceiver { private Receiver resultReceiver; public GPSResultReceiver(Handler handler) { super(handler); } public void setReceiver(Receiver receiver) { resultReceiver = receiver; } public interface Receiver { public void onReceiveResult(int resultCode, Bundle resultData); } @Override public void onReceiveResult(int resultCode, Bundle resultData) { if (resultReceiver != null) { resultReceiver.onReceiveResult(resultCode, resultData); } } } So why does this cast occur here and how can I work around it? Thanks in advance
0
[ 2, 718, 6146, 10066, 872, 27, 164, 23631, 5, 6, 37, 21, 16554, 579, 3095, 19, 21, 365, 800, 3726, 3726, 31, 22, 79, 749, 20, 8713, 21, 365, 17, 31, 57, 21, 718, 6146, 10066, 872, 19, 51, 365, 9, 179, 1474, 2532, 22, 38, 1655...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to build sql query === I Have fired certain query in sql and i got result as catid url count 928 url1 790 928 url2 790 928 url3 790 928 url4 790 928 url5 790 928 url6 790 928 url7 790 4180 url8 800 4180 url9 800 4180 url10 800 4180 url11 800 4180 url12 800 2818 url13 810 2818 url14 810 2818 url15 810 2818 url16 810 4574 url17 820 4574 url18 820 4574 url19 820 4574 url20 820 4574 url21 820 664 url22 830 664 url23 830 664 url24 830 1898 url22 830 1898 url23 830 1898 url24 830 1898 url25 830 result cycle should be 1898 url22 830 4574 url17 820 2818 url13 810 4180 url8 800 928 url1 790 664 url23 830 4574 url18 820 2818 url14 810 4180 url9 800 928 url2 790 664 url24 830 4574 url19 820 2818 url15 810 4180 url10 800 928 url3 790 1898 url22 830 4574 url20 820 2818 url16 810 4180 url11 800 928 url4 790 1898 url23 830 4574 url21 820 4180 url12 800 928 url5 790 1898 url24 830 928 url6 790 1898 url25 830 928 url7 790 how can get such cycle with above ordering many thanks..
1
[ 2, 184, 20, 1895, 4444, 255, 25597, 800, 3726, 3726, 31, 57, 3899, 1200, 25597, 19, 4444, 255, 17, 31, 330, 829, 28, 2008, 1340, 287, 6362, 2468, 561, 2714, 287, 6362, 165, 13, 25242, 561, 2714, 287, 6362, 135, 13, 25242, 561, 271...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PHP Parse XML and sort Child Nodes alphabetically === I have an XML file and parse it into my PHP document. I want to order the child nodes of my XML in an alphabetical order and show them in my select box. Can someone please help me? I'm stuck in the sorting process... :) country.xml <?xml version="1.0"?> <countries> <country> <name>Deutschland</name> <league>Bundesliga</league> </country> <country> <name>Frankreich</name> <league>Ligue 1</league> </country> <country> <name>Osterreich</name> <league>Tipp3-Bundesliga</league> </country> <country> <name>England</name> <league>Premier League</league> </country> <country> <name>Schweden</name> <league>Allsvenskan</league> </country> <country> <name>Kanada</name> <league>Canadian Soccer League</league> </country> </countries> My PHP code looks as follows: echo "<select>"; foreach ($newXml as $item) { $country=$item->name; $league=$item->league; echo $league; echo "<option>".$country."-".$league."</option>"; } echo "</select>";
0
[ 2, 13, 26120, 2017, 870, 23504, 17, 2058, 850, 16272, 27169, 102, 800, 3726, 3726, 31, 57, 40, 23504, 3893, 17, 2017, 870, 32, 77, 51, 13, 26120, 4492, 9, 31, 259, 20, 389, 14, 850, 16272, 16, 51, 23504, 19, 40, 27169, 389, 17, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to add custom page template in custom taxonomy in WordPress with Thesis theme 1.8 === How can i assign a different custom template for my taxonomy page with thesis? I know it's easy with Wordpress alone but when it comes to Thesis i can't figure out how to make it use my custom template. I still want to retain the Thesis core functionality. Anyone who has an idea about this? I manage to solve this on Custom post type by using this code. function movie_single_page_mh(){ if( get_post_type() == 'movie' )://movie single page include_once "temp/movie_all.php"; endif; } function my_template_redirect(){ if (get_post_type() == 'movie'){ global $wp_query; add_post_meta($wp_query->post->ID,'_wp_page_template','custom_template.php',TRUE); $wp_query->is_page = true; } } add_action('template_redirect','my_template_redirect'); add_action('thesis_hook_custom_template', 'movie_single_page_mh');//custom Movie Single Page My question is how can i add a condition that my custom tax will be redirected on that custom file.
0
[ 2, 184, 20, 3547, 5816, 2478, 22894, 19, 5816, 26802, 19, 833, 5890, 29, 10452, 3184, 137, 9, 457, 800, 3726, 3726, 184, 92, 31, 13952, 21, 421, 5816, 22894, 26, 51, 26802, 2478, 29, 10452, 60, 31, 143, 32, 22, 18, 2010, 29, 833...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
mod_rewrite to redirect url not working === Cannot seem to get a mod_rewrite to work. We have a domain name that has already been printed here, there and everywhere when the website was Flash. It has a # in its trail /#login.php and we want so that when people put this in it redirects them to /login.php. I have already tried this rule but can't get it to work: RewriteEngine On RewriteRule ^/#login.php$ /login.php I have also checked that the rewrite engine is working by using a redirect to google. Just need the out of date #login.php to go to the new login.php thanks
0
[ 2, 7226, 1, 99, 23716, 20, 302, 14706, 287, 6362, 52, 638, 800, 3726, 3726, 1967, 2260, 20, 164, 21, 7226, 1, 99, 23716, 20, 170, 9, 95, 57, 21, 4603, 204, 30, 63, 614, 74, 5317, 235, 15, 80, 17, 6417, 76, 14, 2271, 23, 4433...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
comparing two text files using python === i'm trying to compare two text files and to identify and save the different lines in a new text file, but i dont know how to do it because im very very new to Python. Can anyone help me pls?
0
[ 2, 15047, 81, 1854, 6488, 568, 20059, 800, 3726, 3726, 31, 22, 79, 749, 20, 11590, 81, 1854, 6488, 17, 20, 5808, 17, 2079, 14, 421, 1560, 19, 21, 78, 1854, 3893, 15, 47, 31, 1049, 143, 184, 20, 107, 32, 185, 797, 253, 253, 78,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
UITableView issue (iOS) === I wonder why cellForRowAtIndexPath function is called when scrolling the table. Does it mean on every scrolling cell configuration code runs again? I have a slowness problem when scrolling the table. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"CountryCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } // Configure the cell... NSString *continent = [self tableView:tableView titleForHeaderInSection:indexPath.section]; NSString *country = [[self.countries valueForKey:continent] objectAtIndex:indexPath.row]; cell.textLabel.text = country; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; return cell; }
0
[ 2, 13, 11193, 579, 4725, 1513, 13, 5, 7760, 6, 800, 3726, 3726, 31, 2666, 483, 1667, 1106, 5417, 721, 25671, 8353, 1990, 25, 227, 76, 13, 28166, 14, 859, 9, 630, 32, 884, 27, 352, 13, 28166, 1667, 8091, 1797, 1461, 188, 60, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
sharepoint datawebpart paging issue with groupings === I created a dataview webpart in designer and have two different groupings. I enabled the grouping headers so they show up in my webpart. The issue I am having is that I want to make the first grouping visible on the first page (or other pages) so people then use the expand/collapse functionality to view other info. When I select display all items option in the paging functionality, the webpart breaks. Please help.
0
[ 2, 1891, 3132, 1054, 14113, 3091, 19006, 68, 1513, 29, 19288, 18, 800, 3726, 3726, 31, 679, 21, 1054, 4725, 2741, 3091, 19, 4742, 17, 57, 81, 421, 19288, 18, 9, 31, 9338, 14, 19288, 157, 445, 86, 59, 298, 71, 19, 51, 2741, 3091,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Mocha testing express.js app http request === I need to test a right response that comes from route function. In https://github.com/visionmedia/express/blob/master/test/app.router.js I see code: app.get('/:name', function(req, res, next){ res.send(req.params.name); }); request(app) .get('/foo%2Fbar') .expect('foo/bar', done); I wonder what is **request(app)** how can I include it?
0
[ 2, 1873, 1651, 4431, 2999, 9, 728, 18, 4865, 7775, 3772, 800, 3726, 3726, 31, 376, 20, 1289, 21, 193, 1627, 30, 1624, 37, 858, 1990, 9, 19, 7775, 18, 6903, 10404, 20926, 9, 960, 118, 10732, 8260, 118, 21230, 118, 7091, 220, 118, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Avoid checking for nil when accessing subelement === This is maybe a more cosmetic problem, but I find it really annoying as I always end up with some ugly code. And readability is always important, right? I want to check if a value exists in a hash within a hash within a hash. So what I do is this. already_exists_data[:data][:user_id] But that can get me a nullpointer exception if :data is nil and checking :data might give me a nullpointer if already_exists_data is nil. So what I end up with is this: if already_exists_data && already_exists_data[:data] && already_exists_data[:data][:user_id] # Do stuff end Now that's some nasty looking code. Perhaps I should modify the hash to be an object instead. But I keep bumping in to this problem sometimes and was wondering how you guys confront it. I'm currently coding in Ruby but I've had this problem with multiple other languages.
0
[ 2, 2658, 9886, 26, 1781, 255, 76, 1381, 68, 972, 27567, 800, 3726, 3726, 48, 25, 913, 21, 91, 18872, 1448, 15, 47, 31, 477, 32, 510, 17610, 28, 31, 550, 241, 71, 29, 109, 9212, 1797, 9, 17, 1302, 4091, 25, 550, 681, 15, 193, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
iOS: Using UIScrollView with paging enabled === I have implemented paging using UIScrollView and adding UIVIew and UIControls in this UIVIew on each pages. Surprisingly none of the UIControl responding when it is on UIScrollView with paging enabled! Following is my code. Could anyone please tell me how to get UIControls working on UIScrollView with paging enabled? - (void)viewDidLoad { [super viewDidLoad]; AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; int totalPages = [[delegate sections] count] + 2; // 2 for startOfDayQuestions and endOfDayQuestions int X = 45, Y = 20, H = 40, W = 680; // start of the day questions CGRect startFrame = scrollView.frame; startFrame.origin.x = 0; startFrame.origin.y = 0; UIView *startPage = [[UIView alloc] initWithFrame:startFrame]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(X, Y, W, H)]; label.backgroundColor = [UIColor clearColor]; label.textColor = [UIColor blackColor]; label.text = @"Text"; label.font = [UIFont fontWithName:paragraph_font_name size:paragraph2_font_size]; [startPage addSubview:label]; Y += H; UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(X, Y, W, H)]; textField.borderStyle = UITextBorderStyleRoundedRect; textField.font = [UIFont systemFontOfSize:15]; textField.placeholder = @"enter text"; textField.autocorrectionType = UITextAutocorrectionTypeNo; textField.keyboardType = UIKeyboardTypeDefault; textField.returnKeyType = UIReturnKeyDone; textField.clearButtonMode = UITextFieldViewModeWhileEditing; textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; textField.delegate = self; textField.userInteractionEnabled = YES; [startPage addSubview:textField]; --> This UITextField doesn't respond when added to startPage and in turns scrollView but works fine if I add it to self.view! // a page is the width of the scroll view scrollView.pagingEnabled = YES; scrollView.userInteractionEnabled = YES; scrollView.contentSize = CGSizeMake(scrollView.frame.size.width * totalPages, scrollView.frame.size.height); scrollView.showsHorizontalScrollIndicator = NO; scrollView.showsVerticalScrollIndicator = NO; scrollView.scrollsToTop = NO; scrollView.delegate = self; pageControl.numberOfPages = totalPages; pageControl.currentPage = 0; } - (void)scrollViewDidScroll:(UIScrollView *)sender { if (pageControlUsed) return; CGFloat pageWidth = scrollView.frame.size.width; int page = floor((scrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1; pageControl.currentPage = page; } - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { pageControlUsed = NO; } - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { pageControlUsed = NO; } - (IBAction)changePage:(id)sender { int page = pageControl.currentPage; CGRect frame = scrollView.frame; frame.origin.x = frame.size.width * page; frame.origin.y = 0; [scrollView scrollRectToVisible:frame animated:YES]; pageControlUsed = YES; }
0
[ 2, 13, 7760, 45, 568, 13, 5661, 3862, 8694, 4725, 29, 19006, 68, 9338, 800, 3726, 3726, 31, 57, 6807, 19006, 68, 568, 13, 5661, 3862, 8694, 4725, 17, 4721, 13, 5661, 4725, 17, 13, 5661, 12898, 18, 19, 48, 13, 5661, 4725, 27, 206...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
set default spring mvc web page === i am trying to set a default web page for my spring mvc app but for some odd reason it does not work and i keep getting a page not found error on my browser. here is my web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <servlet> <servlet-name>P2PAppStore</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>P2PAppStore</servlet-name> <url-pattern>*.html</url-pattern> </servlet-mapping> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value> </param-value> </context-param> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/log4j.xml</param-value> </context-param> <welcome-file-list> <welcome-file> index.jsp </welcome-file> </welcome-file-list> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> </web-app> on my mvc-config.xml i added this as well and also tried it without it <mvc:view-controller path="/" view-name="index" /> my jsp index file <%@ include file="include.jsp"%> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> <meta http-equiv="Cache-Control" content="private, no-cache, no-store, must-revalidate" /> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="0" /> <!-- Allows correct zoom on mobile devices --> <meta name="viewport" content="width = device-width" /> <head> <link rel="stylesheet" type="text/css" href="resources/css/mwFI.css"> <!-- <img src="<%=request.getContextPath()%>/assets/headerBanner.jpg"/> --> <title>VisaEu App Store</title> <div id="header"> <div id="logo"></div></div> </head> <body> <div id="contentWrapper"> <div id="content"> <h1>VisaeuP2P AppStore</h1> <c:choose> <c:when test="${clientType eq 'Android' || clientType eq 'BlackBerry'}"> <p>Please click on the links below to download latest client for ${clientType}.</p> <br /> <c:if test="${clientType eq 'Android'}"> </c:if> <c:if test="${clientType eq 'BlackBerry'}"> </c:if> <c:forEach items="${clientFileList}" varStatus="loop"> <a href="download-client/${clientType}">Link to ${clientType}</a> </c:forEach> <br /> <a href="download-client/${clientType}">Link to ${clientType}</a> </c:when> <c:otherwise> <p>This website is only viewable from a android or blackberry device</p> <br /> </c:otherwise> </c:choose> <div id="btn-row" class="tidy"> <div class="btn-about"> </div> <div class="btn-divider">&nbsp;</div> <div class="btn-banks"> </div> <div class="btn-divider">&nbsp;</div> <div class="btn-faqs"> </div> </div> <div class="tidy"></div> </body> </html> And finally my servlet code: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd"> <import resource="mvc-config.xml" /> <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" /> <!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory --> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/views/" /> <property name="suffix" value=".jsp" /> </bean> <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" /> <context:component-scan base-package="com.monitise.visaeuappstore.controllers"></context:component-scan> <!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory --> <mvc:resources mapping="/resources/**" location="/resources/" /> </beans>
0
[ 2, 309, 12838, 1573, 307, 8990, 2741, 2478, 800, 3726, 3726, 31, 589, 749, 20, 309, 21, 12838, 2741, 2478, 26, 51, 1573, 307, 8990, 4865, 47, 26, 109, 4210, 1215, 32, 630, 52, 170, 17, 31, 643, 1017, 21, 2478, 52, 216, 7019, 27,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
jQuery fix for the iOS viewport === Is there a way to convert the script for fixing the viewport into jQuery. Now the script is working parallel with jQuery script, and don't know how it going to conflict with jQuery. The script is: // Rewritten version // By @mathias, @cheeaun and @jdalton (function(doc) { var addEvent = 'addEventListener', type = 'gesturestart', qsa = 'querySelectorAll', scales = [1, 1], meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; function fix() { meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1]; doc.removeEventListener(type, fix, true); } if ((meta = meta[meta.length - 1]) && addEvent in doc) { fix(); scales = [.25, 1.6]; doc[addEvent](type, fix, true); } }(document)); Source: http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/
0
[ 2, 487, 8190, 93, 6098, 26, 14, 13, 7760, 1418, 1993, 800, 3726, 3726, 25, 80, 21, 161, 20, 8406, 14, 3884, 26, 20047, 14, 1418, 1993, 77, 487, 8190, 93, 9, 130, 14, 3884, 25, 638, 3821, 29, 487, 8190, 93, 3884, 15, 17, 221, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can we keep the installed application and created servers when running removeNode from WebSphere? === Recently, we've got request to refederate current WAS 6.1 Node to new WAS 7.1 DmgrNode. Right now, that WAS 6.1 Node is running under V6.1 DmgrNode. From my understanding, when using removeNode against 6.1 Node, all the installed applications and servers inside would be removed consequently. Is that possible to get some way to keep these stuffs during the operation? Or any other solution to accomplish this? Thanks in advance
0
[ 2, 92, 95, 643, 14, 4066, 3010, 17, 679, 17595, 76, 946, 4681, 251, 546, 37, 2741, 14079, 60, 800, 3726, 3726, 1989, 15, 95, 22, 195, 330, 3772, 20, 13, 14057, 13528, 5487, 866, 23, 400, 9, 165, 15421, 20, 78, 23, 453, 9, 165,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using Backbone.Collection for a Paginated List? === I'm wondering if I should be using a Backbone.Collection called `ExerciseList` for my exercises page, which displays `Exercise`s filtered by various properties. Each `Exercise` is rendered with an `ExerciseRowView`. So, would an `ExerciseList` and `ExerciseListView` be feasible/useful in this sort of situation? Thanks!
0
[ 2, 568, 24036, 9, 15015, 872, 26, 21, 19006, 12721, 968, 60, 800, 3726, 3726, 31, 22, 79, 5712, 100, 31, 378, 44, 568, 21, 24036, 9, 15015, 872, 227, 13, 1, 1706, 106, 150, 2628, 5739, 1, 26, 51, 12612, 2478, 15, 56, 9412, 13,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
y axis on bar chart for dundas not being rendered === I am facing an issue where in when my y axis are not being rendered correctly on bar chart.Interval is set to 2(which is what i want i.e 2-4-6) and interval type is set to minutes Any help would be highly appreciated Thanks
0
[ 2, 13, 93, 8577, 27, 748, 1795, 26, 29320, 52, 142, 10877, 800, 3726, 3726, 31, 589, 4325, 40, 1513, 113, 19, 76, 51, 13, 93, 8577, 50, 52, 142, 10877, 12044, 27, 748, 1795, 9, 6280, 3377, 25, 309, 20, 172, 5, 2140, 25, 98, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Programming Adaptive filters === I want to code a Block LMS adaptive filter in Matlab (no Simulink), in the equations, the weights are updated based on the error difference between the output signal and the desired signal! The thing is, the signal which I want to filter varies. Sometimes I want the cut off frequency to be at 5Hz, at other times 18 Hz and so on. How am I supposed to provide the desired signal for my filter from the first place if I don't know what it is at a specified time, and how it even looks like ? The signals are being the output of accelerometers and gyroscopes! regards, Orion
0
[ 2, 3143, 22142, 21062, 800, 3726, 3726, 31, 259, 20, 1797, 21, 1921, 13, 10363, 18, 22142, 11945, 19, 4277, 9086, 13, 5, 251, 4861, 291, 6258, 6, 15, 19, 14, 12853, 15, 14, 1763, 18, 50, 6372, 432, 27, 14, 7019, 2841, 128, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Toggling css in knockout.js for changing select list width === I am using Knockout.js with jQuery tmpl plugin. The template I have defined has a few select lists. I need to expand the width of the select items (on IE 8) when a select list is clicked (to accomodate the longest element in the list). I was thinking of toggling the css class when a user clicks on the select list to achieve this but am not sure how to go about it. Here is what I have so far: <script id='criteriaRowTemplate' type='text/html'> <tr> <td style="width: 23%"><select style="width: 100%" data-bind='event: {click: expandOptions}, options: criteriaData, optionsText: "Text", optionsCaption: "--Select--", value: SearchCriterion' /></td> <td style="width: 24%"><select style="width: 100%" data-bind='visible: SearchCriterion, options: SearchCriterion() ? SearchCriterion().SubCriteria : null, optionsText: "Text", optionsCaption: "--Select--", value: SubCriterion' /></td> <td style="width: 27%"><select style="width: 100%" data-bind='visible: SubCriterion, options: SubCriterion() ? SubCriterion().ColumnValues : null, optionsText: "Text", optionsCaption: "--Select--", value: ColumnValue'/></td> <td style="width: 22%"><select style="width: 100%" data-bind='visible: ColumnValue, options: ColumnValue() ? ColumnValue().StateValues : null, optionsText: "Text", optionsCaption: "--Select--", value: StateValue'/></td> <td ><button style="background-position: center;width:10px; border-style: none; background-image: url('@Url.Content("~/Content/Images/icon-caution_close.png")'); background-repeat: no-repeat; height: 20px; width: 3px; background-color: White; font-size: 0px" data-bind='click: function() { viewModel.removeLine($data) }'></button></td> </tr> </script> var CriteriaLine = function() { this.SearchCriterion = ko.observable(); this.SubCriterion = ko.observable(); this.ColumnValue = ko.observable(); this.StateValue = ko.observable(); // Whenever the Search Criteria changes, reset the Sub Criteria selection this.SearchCriterion.subscribe(function() { this.SubCriterion(undefined); }.bind(this)); this.SubCriterion.subscribe(function() { this.ColumnValue(undefined); }.bind(this)); this.ColumnValue.subscribe(function() { this.StateValue(undefined); }.bind(this)); expandOptions = function(element) { }; }; How can I toggle the css class on click of the select list and toggle it back when the user clicks elsewhere? Alternatively, is there any other approach to ensure that the user sees the full text of the dropdown in IE 8?
0
[ 2, 20, 4572, 802, 272, 18, 18, 19, 11676, 9, 728, 18, 26, 4226, 5407, 968, 9456, 800, 3726, 3726, 31, 589, 568, 11676, 9, 728, 18, 29, 487, 8190, 93, 13, 38, 79, 5727, 10922, 108, 9, 14, 22894, 31, 57, 2811, 63, 21, 310, 540...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to save the resultSet from SQL Query in order to be used several times? === I have this issue: first, I execute a SQL query using Java and then the result is stored into a resultSet() called rs. The query is as follows: "select ad_id, publisher_id, date, impressions, clicks from table" Then I read all the data using: while(rs.next()){ (...) } The problem is that the code we are running needs to re-use all information from rs several times (running stochastic gradient so there are several iterations) but when the it starts a new iteration (going from iteration 1 to 2) rs now is null and we have to execute the SQL query once again which takes quite a long time... Is there some "direct" way of saving the result from this query into a variable? We considered creating two ArrayLists to save the Integers numbers (ad_id, publisher_id...) and one for the date field and then iterate over those lists, but we thought maybe there´s a better and easier way of doing so In python all we had to do is something like: data = cursor.fetchall() and the variable "data" could be used several times, maybe there´s something similar in Java (I´m still learning Java so I´m not sure) Thanks for any help
0
[ 2, 184, 20, 2079, 14, 1736, 1198, 37, 4444, 255, 25597, 19, 389, 20, 44, 147, 238, 436, 60, 800, 3726, 3726, 31, 57, 48, 1513, 45, 64, 15, 31, 15644, 21, 4444, 255, 25597, 568, 8247, 17, 94, 14, 829, 25, 8214, 77, 21, 1736, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Hide ticker text in notification using Notification.Builder === I'm trying to display an ongoing notification without the initial ticker text display. I was able to get this working with the older style Notification by setting ticker text to null in the constructor: mNotification = new Notification(R.drawable.ic_stat_playing, null, System.currentTimeMillis()); However, I noticed that instantiating a Notification this way is now deprecated, and the use of Notification.Builder is recommended instead. However, I cannot get the notification now to display without the ticker text, even when I set ticker text to null: Notification.Builder builder = new Notification.Builder(this); CharSequence contentText = "contentText here"; Intent launchIntent = new Intent(this, MainActivity.class); // The PendingIntent to launch our activity if the user selects this // notification PendingIntent contentIntent = PendingIntent.getActivity(this, -1, launchIntent, PendingIntent.FLAG_UPDATE_CURRENT); builder.setContentIntent(contentIntent) .setSmallIcon(R.drawable.ic_stat_playing) .setLargeIcon(null) .setTicker(null) .setOnlyAlertOnce(true) .setWhen(System.currentTimeMillis()) .setContentTitle(contentTitle) .setOngoing(true) .setContentText(contentText); mNotification = builder.getNotification(); startForeground(NOTIFICATION_ID, mNotification); Is it just not possible to turn off the ticker display with the new Notification.Builder? Is so, that's unfortunate, since I won't be able to update from the deprecated code.
0
[ 2, 3077, 8809, 106, 1854, 19, 52, 4634, 568, 52, 4634, 9, 20904, 800, 3726, 3726, 31, 22, 79, 749, 20, 3042, 40, 6748, 52, 4634, 366, 14, 2104, 8809, 106, 1854, 3042, 9, 31, 23, 777, 20, 164, 48, 638, 29, 14, 1234, 1034, 52, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
rails instance variable not working in the template === #_form.html.erb <% @all_categories.each do |cat| -%> <li><%= check_box_tag('categories[]' , cat.id , @post.categories.collect{|c| c.id}.include?(cat.id))%> <%= cat.name %></li> <% end -%> #posts_controller @all_categories = Category.find(:all , :order => 'name ASC') #rails console @all_categories = Category.find(:all , :order => 'name ASC') Category Load (0.2ms) SELECT `categories`.* FROM `categories` ORDER BY name ASC => [#<Category id: 1, name: "General", short_name: "general", description: "This is a general category">] #error undefined method `each' for nil:NilClass #doubt not able to understand the same Category.find(:all , :order => 'name ASC') is working in the rails console but not returning anything in the template and controller please help
0
[ 2, 2240, 18, 4851, 7612, 52, 638, 19, 14, 22894, 800, 3726, 3726, 6926, 1, 4190, 9, 15895, 9, 106, 220, 13, 1, 11881, 13, 1, 1233, 1, 14375, 1596, 9, 14322, 107, 13, 1, 5782, 1, 13, 8, 11881, 1, 13, 1, 1210, 1, 11881, 3726, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
c# opensource project to draw graphics or should I write that myself? === In my trading software I need to draw graphics. I have huge array (about 20 000 000 items) of [x,y] (where x is time and y is price) and I need to display it on the graphic. I need ability to zoom interesting parts. Also I need ability to add custom labels to display trades and orders (or I can implement this myself). I'm looking for something simple and open. What can you recomend? If I should write that from scratch then what techniques should I use? If you can suggest brilliant library on another language (c++, java or whatever) that would be also fine.
4
[ 2, 272, 5910, 368, 12097, 669, 20, 2003, 8351, 54, 378, 31, 2757, 30, 992, 60, 800, 3726, 3726, 19, 51, 5205, 2306, 31, 376, 20, 2003, 8351, 9, 31, 57, 2329, 7718, 13, 5, 6901, 434, 13, 3993, 13, 3993, 3755, 6, 16, 636, 396, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Asp.net WCF and integrated Windows authentication and IIS 6.0 === I have been struggling with this problem, read many questions, articles but could not solve it. so here I am. Webservice is within a website and I access it from a Console application [testing]. here is my Web.Config code <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="Services.CilsDataReceiveBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> </behaviors> <bindings> <basicHttpBinding> <binding name="WindowsAuth"> <security mode="TransportCredentialOnly" > <transport clientCredentialType="Windows"/> </security> </binding> </basicHttpBinding> </bindings> <services> <service behaviorConfiguration="Services.CilsDataReceiveBehavior" name="Services.CilsDataReceive"> <endpoint address="" binding="basicHttpBinding" name="BasicHttpEndpoint" bindingConfiguration="WindowsAuth" contract="Services.ICilsDataReceive" /> <endpoint address="mex" binding="webHttpBinding" contract="IMetadataExchange" /> </service> </services> </system.serviceModel> Below is my code and app.config used in **Console** application. <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_ICilsDataReceive" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://wgb01wa7002.worldwide.co.uk:44001/Services/CilsDataReceive.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICilsDataReceive" contract="ICilsDataReceive" name="BasicHttpBinding_ICilsDataReceive" /> </client> </system.serviceModel> Below is the cs code icDateList.titlesField = titles.ToArray(); var cilsDataReceiveClient = new CilsDataReceiveClient(); try { cilsDataReceiveClient.RecieveICDateList(icDateList); Console.WriteLine(" O_O Service saved the data O_O"); } catch (Exception exception) { cilsDataReceiveClient.Abort(); Console.WriteLine(exception.Message); throw; } finally { Console.Read(); } error message is "The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'." If a change my Console application app.config to <security mode="TransportCredentialOnly"> <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> I get below error "'http://wgb01wa7002.worldwide.co.uk:44001/Services/CilsDataReceive.svc' could not be activated. See the server's diagnostic trace logs for more information." I tried many things tries WsHttpBinding but i think that uses Https rather http. Could you please suggest something? Edit: if I access it from browser I get "Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service."
0
[ 2, 28, 306, 9, 2328, 11801, 410, 17, 5547, 1936, 27963, 17, 595, 18, 400, 9, 387, 800, 3726, 3726, 31, 57, 74, 7587, 29, 48, 1448, 15, 1302, 151, 2346, 15, 3376, 47, 110, 52, 8402, 32, 9, 86, 235, 31, 589, 9, 2741, 11449, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Cloudfoundry , Spring , MySQL Unknown initial character set index '192' received from server === when i tried to run my page on cloudfoundry that uses MySQL i received this error org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown initial character set index '192' received from server. Initial client character set can be forced via the 'characterEncoding' property.) What did i miss ? I did try below to change from my UTF-8 to LATIN, still receive the error ALTER TABLE t MODIFY col1 VARCHAR(50) CHARACTER SET latin1; Thanks for all the replies
0
[ 2, 4005, 12235, 622, 13, 15, 1573, 13, 15, 51, 18, 22402, 2562, 2104, 925, 309, 4348, 13, 22, 19532, 22, 420, 37, 8128, 800, 3726, 3726, 76, 31, 794, 20, 485, 51, 2478, 27, 4005, 12235, 622, 30, 2027, 51, 18, 22402, 31, 420, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to post on FB page via FB application === This works fine: $user = $this->facebook->getUser(); $loginUrl = $this->facebook->getLoginUrl(array('scope' => 'publish_stream')); try { $post = $this->facebook->api('/me/feed', 'post', array('message'=>'Test message !')); } catch (FacebookApiException $e) { header("Location:{$loginUrl}"); } In this case, post is made on my wall by application. But, I want to make the post on the application page by the application. When I change $this->facebook->api('/me/feed') to $this->facebook->api('/xxxxxxxxxxxxxxx/feed') , Post is made by me on the application. So, how to make the post by the application on the application page itself i.e. on the FB page which can be created from the application. So, I can see the posted post as "Test message" via 'application_name'.
0
[ 2, 184, 20, 678, 27, 13, 13478, 2478, 1197, 13, 13478, 3010, 800, 3726, 3726, 48, 693, 1123, 45, 5579, 16704, 800, 5579, 1565, 8, 1, 6413, 5199, 8, 1, 3060, 16704, 5, 6, 73, 5579, 5567, 108, 911, 255, 800, 5579, 1565, 8, 1, 64...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to set the id of a foreign key id #sf2 #doctrine2 === I'm trying to manually set an foreign key id to an object, but didn't find how to do it class Item { /** * @ORM\ManyToOne(targetEntity="MyBundle\Entity\ItemType", inversedBy="itemTypes") * @ORM\JoinColumn(name="type_id", referencedColumnName="id") */ protected $item_type; } Is there a way to do something link that? $item = new Item(); $item->setItemTypeId(1); // This generate an error. Or do i have to do like that ? $item = new Item(); $type = Repository::RetrieveById(1); $item->setItemType($type); // This generate an error. Thanks for your help Yoni
0
[ 2, 184, 20, 309, 14, 4924, 16, 21, 1228, 1246, 4924, 6926, 18, 410, 135, 6926, 13799, 38, 7850, 135, 800, 3726, 3726, 31, 22, 79, 749, 20, 23671, 309, 40, 1228, 1246, 4924, 20, 40, 3095, 15, 47, 223, 22, 38, 477, 184, 20, 107,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
associating sorted dates with divs they originated in (before sorting) === I have a collection of parent `div`s that are labeled with unique order numbers based on their `id`, so like, `<div id='parent_uniqueID'>` . They each have child divs which contain information on the order: order number (same as above), name, and order date (mm / dd / yy). I am attempting to sort these parent divs based on each of these columns. Its easy to sort by the order number and rearrange the parent divs. I sort them, then select the parent divs with something like $('#parent_' + order_number);` And I append them to the page. Also simple for alphanumeric; at the end of the alphanumeric string, I append the order, before I sort it. Which is handy because that way if two orders have an identidcal name, the parent divs default to sorting by order number. I have no idea though how to, once finished sorting by date, distinguish which date belongs to which parent div, so that I can grab the parent divs by the `ids` and rearrange them on the page. When I was trying to understand sorting numerically, I received [this really nice solution][1], which I am trying to adapt to dates: $('.sortable').click(function () { if ($(this).hasClass('sortable_date')) { var sort_order = sort_class_distribution($(this)), sort_column = this.id.replace("header_", "") + "_div", content2 = $('#currentOrdersContent2'), date_holder = "", i = 0; var sorted = $('.' + sort_column).map(function () { date_holder = $.trim($(this).text()); //get order number from parent div //only_numbers function strips out everything but numbers cur_order = only_numbers($(this).parents('.order_details_bg_trigger').attr('id')); //check that the text is not "Not given" or "Unavailable" if (date_holder.indexOf("/")) { cur_date = date_holder.split(" / "); //change the text string into a proper javascript date return new Date(cur_date[2], cur_date[0] - 1, cur_date[1]); } else { //if it is 'Not given', assign it today's date return new Date(); } }).toArray().sort(sort_order = "asc" ? date_sort_asc : date_sort_desc); //change javascript date back to mm / dd / yy format //weak attempt to match sorted dates with dates contained in table $.each(sorted, function (i, item) { cur_date = ('0' + (item.getMonth() + 1)).slice(-2) + ' / ' + ('0' + item.getDate()).slice(-2) + ' / ' + item.getFullYear(); }); } }); These are the date sort functions: *source: https://gist.github.com/1772996* function date_sort_asc (date1, date2) { if (date1 > date2) return 1; if (date1 < date2) return -1; return 0; } function date_sort_desc (date1, date2) { if (date1 > date2) return -1; if (date1 < date2) return 1; return 0; } Any suggestions on how to do this, or a new patten are welcome. Thanks! [1]: http://stackoverflow.com/a/11146962/1252748
0
[ 2, 28, 18, 16325, 1880, 22554, 4076, 29, 13, 12916, 18, 59, 7449, 19, 13, 5, 12750, 2058, 68, 6, 800, 3726, 3726, 31, 57, 21, 1206, 16, 4766, 13, 1, 12916, 1, 18, 30, 50, 14348, 29, 2619, 389, 2116, 432, 27, 66, 13, 1, 1340,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to design ui automation that allows easy switching of automation tools === Can you describe what patterns would be better suited for a UI automation framework that can easily or less painfully allow me to switch from say Watin to selenium in the future? Or allows me to switch between Watin and selenium on the fly? Thanks
4
[ 2, 184, 20, 704, 13, 5661, 23217, 30, 2965, 2010, 13027, 16, 23217, 4672, 800, 3726, 3726, 92, 42, 4996, 98, 6282, 83, 44, 574, 12949, 26, 21, 13, 5661, 23217, 6596, 30, 92, 2351, 54, 787, 19840, 1655, 55, 20, 5521, 37, 395, 155...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Nhibernate Cannot delete the child object === I know it has been asked for many times, i also have found a lot of answers on this website, but i just **cannot** get out this problem. Can anyone help me with this piece of code? Many thanks. Here is my parent mapping file <set name="ProductPictureList" table="[ProductPicture]" lazy="true" order-by="DateCreated" inverse="false" cascade="all-delete-orphan" > <key column="ProductID"/> <one-to-many class="ProductPicture"/> </set> Here is my child mapping file <class name="ProductPicture" table="[ProductPicture]" lazy="true"> <id name="ProductPictureID"> <generator class="identity" /> </id> <property name="ProductID" type="Int32"></property> <property name="PictureName" type="String"></property> <property name="DateCreated" type="DateTime"></property> </class> Here is my c# code var item = _productRepository.Get(productID); var productPictrue = item.ProductPictureList .OfType<ProductPicture>() .Where(x => x.ProductPictureID == productPictureID); // reomve the finding item var ok = item.ProductPictureList.Remove(productPictrue); _productRepository.SaveOrUpdate(item); ok is false value and this child object is still in my database.
0
[ 2, 12109, 15191, 8820, 1967, 27448, 14, 850, 3095, 800, 3726, 3726, 31, 143, 32, 63, 74, 411, 26, 151, 436, 15, 31, 67, 57, 216, 21, 865, 16, 6709, 27, 48, 2271, 15, 47, 31, 114, 13, 1409, 1245, 1270, 1409, 164, 70, 48, 1448, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Building iOS app that renders Sql Server Reporting Services report === I'm about to begin a project where I will be attempting to create an iPad app that can render reports from a SSRS report server. I really don't know where to begin with this project. Does anyone have any recommendations on a good way of doing this? Any help is appreciated.
4
[ 2, 353, 13, 7760, 4865, 30, 16535, 18, 4444, 255, 8128, 6670, 687, 1330, 800, 3726, 3726, 31, 22, 79, 88, 20, 2348, 21, 669, 113, 31, 129, 44, 6314, 20, 1600, 40, 31, 8240, 4865, 30, 92, 16535, 2813, 37, 21, 22118, 18, 1330, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Get Hubot to talk at a certain time? === I'm thinking about making a Hubot clock-based notifier (think "It's 5, time to go home!" but less annoying and for a different reason). What's the best way to go about doing something like this in a Hubot script?
0
[ 2, 164, 5814, 2779, 20, 930, 35, 21, 1200, 85, 60, 800, 3726, 3726, 31, 22, 79, 1440, 88, 544, 21, 5814, 2779, 4229, 8, 1281, 52, 16292, 13, 5, 10550, 13, 7, 242, 22, 18, 331, 15, 85, 20, 162, 213, 187, 7, 47, 787, 17610, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
print drver to nook === Purpose of what I am going to ask: I Want to be able to print to the B&N Nook(1st generation); just connect it to the computer and treat it like a printer. The driver should store the settings like screen size and preferred font size. Additionally, I want to queue up all the print requests to nook, if its not connected at the time(this feature is not needed but nice to have). I couldn't find anything that will achieve this via Google. I am setting out to create the printer driver myself. My question is: Would the best approach be to use the Widows Driver Kits(WDK) and create a printer driver or Can I use Java to program this some other way (like using Android SDK). I am new to both WDK and Android programming. If I am missing something too obvious, Please excuse my ignorance and point me in the right direction. Any advise is greatly appreciated. Thank you, Shiva
0
[ 2, 4793, 744, 2304, 20, 90, 3085, 800, 3726, 3726, 2131, 16, 98, 31, 589, 228, 20, 1349, 45, 31, 259, 20, 44, 777, 20, 4793, 20, 14, 334, 1569, 103, 90, 3085, 5, 165, 384, 2782, 6, 73, 114, 6379, 32, 20, 14, 1428, 17, 5752, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the syntax for the SQL INSERT INTO statement distributed at table inheritance? === I am a beginner and have just started experimenting with the modeling tool in Entity Framework 4.1. The picture shows a diagram of my database and further down there are the automatically generated scripts to create my database (SQL Server 2008). ![enter image description here][1] -- -------------------------------------------------- -- Entity Designer DDL Script for SQL Server 2005, 2008, and Azure -- -------------------------------------------------- -- Date Created: 06/25/2012 21:49:52 -- Generated from EDMX file: D:\Libraries\Documents\Visual Studio 2010\HomeControl\DAL\HomeControlModel.edmx -- -------------------------------------------------- SET QUOTED_IDENTIFIER OFF; GO USE [HomeControl]; GO IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA [dbo]'); GO -- -------------------------------------------------- -- Dropping existing FOREIGN KEY constraints -- -------------------------------------------------- IF OBJECT_ID(N'[dbo].[FK_CameraImage]', 'F') IS NOT NULL ALTER TABLE [dbo].[ImageSet] DROP CONSTRAINT [FK_CameraImage]; GO IF OBJECT_ID(N'[dbo].[FK_EventTypeAction]', 'F') IS NOT NULL ALTER TABLE [dbo].[ActionSet] DROP CONSTRAINT [FK_EventTypeAction]; GO IF OBJECT_ID(N'[dbo].[FK_UnitAction]', 'F') IS NOT NULL ALTER TABLE [dbo].[ActionSet] DROP CONSTRAINT [FK_UnitAction]; GO IF OBJECT_ID(N'[dbo].[FK_UserAction]', 'F') IS NOT NULL ALTER TABLE [dbo].[ActionSet] DROP CONSTRAINT [FK_UserAction]; GO IF OBJECT_ID(N'[dbo].[FK_ScheduleUser]', 'F') IS NOT NULL ALTER TABLE [dbo].[UserSet] DROP CONSTRAINT [FK_ScheduleUser]; GO IF OBJECT_ID(N'[dbo].[FK_UnitCommand]', 'F') IS NOT NULL ALTER TABLE [dbo].[CommandSet] DROP CONSTRAINT [FK_UnitCommand]; GO IF OBJECT_ID(N'[dbo].[FK_Camera_inherits_Unit]', 'F') IS NOT NULL ALTER TABLE [dbo].[UnitSet_Camera] DROP CONSTRAINT [FK_Camera_inherits_Unit]; GO IF OBJECT_ID(N'[dbo].[FK_Tellstick_inherits_Unit]', 'F') IS NOT NULL ALTER TABLE [dbo].[UnitSet_Tellstick] DROP CONSTRAINT [FK_Tellstick_inherits_Unit]; GO -- -------------------------------------------------- -- Dropping existing tables -- -------------------------------------------------- IF OBJECT_ID(N'[dbo].[UserSet]', 'U') IS NOT NULL DROP TABLE [dbo].[UserSet]; GO IF OBJECT_ID(N'[dbo].[ActionTypeSet]', 'U') IS NOT NULL DROP TABLE [dbo].[ActionTypeSet]; GO IF OBJECT_ID(N'[dbo].[UnitSet]', 'U') IS NOT NULL DROP TABLE [dbo].[UnitSet]; GO IF OBJECT_ID(N'[dbo].[ImageSet]', 'U') IS NOT NULL DROP TABLE [dbo].[ImageSet]; GO IF OBJECT_ID(N'[dbo].[ScheduleSet]', 'U') IS NOT NULL DROP TABLE [dbo].[ScheduleSet]; GO IF OBJECT_ID(N'[dbo].[ActionSet]', 'U') IS NOT NULL DROP TABLE [dbo].[ActionSet]; GO IF OBJECT_ID(N'[dbo].[CommandSet]', 'U') IS NOT NULL DROP TABLE [dbo].[CommandSet]; GO IF OBJECT_ID(N'[dbo].[UnitSet_Camera]', 'U') IS NOT NULL DROP TABLE [dbo].[UnitSet_Camera]; GO IF OBJECT_ID(N'[dbo].[UnitSet_Tellstick]', 'U') IS NOT NULL DROP TABLE [dbo].[UnitSet_Tellstick]; GO -- -------------------------------------------------- -- Creating all tables -- -------------------------------------------------- -- Creating table 'UserSet' CREATE TABLE [dbo].[UserSet] ( [Id] int IDENTITY(1,1) NOT NULL, [Name] nvarchar(max) NOT NULL, [Schedule_Id] int NOT NULL ); GO -- Creating table 'ActionTypeSet' CREATE TABLE [dbo].[ActionTypeSet] ( [Id] int IDENTITY(1,1) NOT NULL, [Name] nvarchar(max) NOT NULL ); GO -- Creating table 'UnitSet' CREATE TABLE [dbo].[UnitSet] ( [Id] int IDENTITY(1,1) NOT NULL, [Name] nvarchar(max) NOT NULL ); GO -- Creating table 'ImageSet' CREATE TABLE [dbo].[ImageSet] ( [Id] int IDENTITY(1,1) NOT NULL, [Description] nvarchar(max) NULL, [Data] varbinary(max) NOT NULL, [Camera_Id] int NOT NULL ); GO -- Creating table 'ScheduleSet' CREATE TABLE [dbo].[ScheduleSet] ( [Id] int IDENTITY(1,1) NOT NULL, [OneOff] datetime NULL, [Cronexpression] nvarchar(max) NULL ); GO -- Creating table 'ActionSet' CREATE TABLE [dbo].[ActionSet] ( [Id] int IDENTITY(1,1) NOT NULL, [Time] datetime NOT NULL, [Description] nvarchar(max) NOT NULL, [EventType_Id] int NOT NULL, [Unit_Id] int NOT NULL, [User_Id] int NOT NULL ); GO -- Creating table 'CommandSet' CREATE TABLE [dbo].[CommandSet] ( [Id] int IDENTITY(1,1) NOT NULL, [Description] nvarchar(max) NOT NULL, [Unit_Id] int NOT NULL ); GO -- Creating table 'UnitSet_Camera' CREATE TABLE [dbo].[UnitSet_Camera] ( [Login] nvarchar(max) NOT NULL, [Password] nvarchar(max) NOT NULL, [URL] nvarchar(max) NOT NULL, [Id] int NOT NULL ); GO -- Creating table 'UnitSet_Tellstick' CREATE TABLE [dbo].[UnitSet_Tellstick] ( [Id] int NOT NULL ); GO -- -------------------------------------------------- -- Creating all PRIMARY KEY constraints -- -------------------------------------------------- -- Creating primary key on [Id] in table 'UserSet' ALTER TABLE [dbo].[UserSet] ADD CONSTRAINT [PK_UserSet] PRIMARY KEY CLUSTERED ([Id] ASC); GO -- Creating primary key on [Id] in table 'ActionTypeSet' ALTER TABLE [dbo].[ActionTypeSet] ADD CONSTRAINT [PK_ActionTypeSet] PRIMARY KEY CLUSTERED ([Id] ASC); GO -- Creating primary key on [Id] in table 'UnitSet' ALTER TABLE [dbo].[UnitSet] ADD CONSTRAINT [PK_UnitSet] PRIMARY KEY CLUSTERED ([Id] ASC); GO -- Creating primary key on [Id] in table 'ImageSet' ALTER TABLE [dbo].[ImageSet] ADD CONSTRAINT [PK_ImageSet] PRIMARY KEY CLUSTERED ([Id] ASC); GO -- Creating primary key on [Id] in table 'ScheduleSet' ALTER TABLE [dbo].[ScheduleSet] ADD CONSTRAINT [PK_ScheduleSet] PRIMARY KEY CLUSTERED ([Id] ASC); GO -- Creating primary key on [Id] in table 'ActionSet' ALTER TABLE [dbo].[ActionSet] ADD CONSTRAINT [PK_ActionSet] PRIMARY KEY CLUSTERED ([Id] ASC); GO -- Creating primary key on [Id] in table 'CommandSet' ALTER TABLE [dbo].[CommandSet] ADD CONSTRAINT [PK_CommandSet] PRIMARY KEY CLUSTERED ([Id] ASC); GO -- Creating primary key on [Id] in table 'UnitSet_Camera' ALTER TABLE [dbo].[UnitSet_Camera] ADD CONSTRAINT [PK_UnitSet_Camera] PRIMARY KEY CLUSTERED ([Id] ASC); GO -- Creating primary key on [Id] in table 'UnitSet_Tellstick' ALTER TABLE [dbo].[UnitSet_Tellstick] ADD CONSTRAINT [PK_UnitSet_Tellstick] PRIMARY KEY CLUSTERED ([Id] ASC); GO -- -------------------------------------------------- -- Creating all FOREIGN KEY constraints -- -------------------------------------------------- -- Creating foreign key on [Camera_Id] in table 'ImageSet' ALTER TABLE [dbo].[ImageSet] ADD CONSTRAINT [FK_CameraImage] FOREIGN KEY ([Camera_Id]) REFERENCES [dbo].[UnitSet_Camera] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION; -- Creating non-clustered index for FOREIGN KEY 'FK_CameraImage' CREATE INDEX [IX_FK_CameraImage] ON [dbo].[ImageSet] ([Camera_Id]); GO -- Creating foreign key on [EventType_Id] in table 'ActionSet' ALTER TABLE [dbo].[ActionSet] ADD CONSTRAINT [FK_EventTypeAction] FOREIGN KEY ([EventType_Id]) REFERENCES [dbo].[ActionTypeSet] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION; -- Creating non-clustered index for FOREIGN KEY 'FK_EventTypeAction' CREATE INDEX [IX_FK_EventTypeAction] ON [dbo].[ActionSet] ([EventType_Id]); GO -- Creating foreign key on [Unit_Id] in table 'ActionSet' ALTER TABLE [dbo].[ActionSet] ADD CONSTRAINT [FK_UnitAction] FOREIGN KEY ([Unit_Id]) REFERENCES [dbo].[UnitSet] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION; -- Creating non-clustered index for FOREIGN KEY 'FK_UnitAction' CREATE INDEX [IX_FK_UnitAction] ON [dbo].[ActionSet] ([Unit_Id]); GO -- Creating foreign key on [User_Id] in table 'ActionSet' ALTER TABLE [dbo].[ActionSet] ADD CONSTRAINT [FK_UserAction] FOREIGN KEY ([User_Id]) REFERENCES [dbo].[UserSet] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION; -- Creating non-clustered index for FOREIGN KEY 'FK_UserAction' CREATE INDEX [IX_FK_UserAction] ON [dbo].[ActionSet] ([User_Id]); GO -- Creating foreign key on [Schedule_Id] in table 'UserSet' ALTER TABLE [dbo].[UserSet] ADD CONSTRAINT [FK_ScheduleUser] FOREIGN KEY ([Schedule_Id]) REFERENCES [dbo].[ScheduleSet] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION; -- Creating non-clustered index for FOREIGN KEY 'FK_ScheduleUser' CREATE INDEX [IX_FK_ScheduleUser] ON [dbo].[UserSet] ([Schedule_Id]); GO -- Creating foreign key on [Unit_Id] in table 'CommandSet' ALTER TABLE [dbo].[CommandSet] ADD CONSTRAINT [FK_UnitCommand] FOREIGN KEY ([Unit_Id]) REFERENCES [dbo].[UnitSet] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION; -- Creating non-clustered index for FOREIGN KEY 'FK_UnitCommand' CREATE INDEX [IX_FK_UnitCommand] ON [dbo].[CommandSet] ([Unit_Id]); GO -- Creating foreign key on [Id] in table 'UnitSet_Camera' ALTER TABLE [dbo].[UnitSet_Camera] ADD CONSTRAINT [FK_Camera_inherits_Unit] FOREIGN KEY ([Id]) REFERENCES [dbo].[UnitSet] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION; GO -- Creating foreign key on [Id] in table 'UnitSet_Tellstick' ALTER TABLE [dbo].[UnitSet_Tellstick] ADD CONSTRAINT [FK_Tellstick_inherits_Unit] FOREIGN KEY ([Id]) REFERENCES [dbo].[UnitSet] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION; GO -- -------------------------------------------------- -- Script has ended -- -------------------------------------------------- My question is not the Entity Framework itself, but simple SQL syntax. In my model, the **Camera** entity inherits from **Unit**. I want to make an `INSERT` to the **Camera** table, something like this: INSERT INTO UnitSet_Camera (Login, Password, URL) VALUES ('myLoginName' ,'myPassword' ,'http://foo.bar:007'); I also know that this is incomplete because I somehow have to provide my **Camera** entity with a "Name" (because of the inheritance from table **Unit** and its' property "Name") How should a full SQL `INSERT` statement to look for an arbitrary **Camera** entity? [1]: http://i.stack.imgur.com/V5ZjP.png
0
[ 2, 98, 25, 14, 22649, 26, 14, 4444, 255, 14692, 77, 3331, 4387, 35, 859, 13852, 60, 800, 3726, 3726, 31, 589, 21, 26931, 17, 57, 114, 373, 5737, 68, 29, 14, 12807, 5607, 19, 9252, 6596, 268, 9, 165, 9, 14, 2151, 1285, 21, 1416...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What alternatives are out there to RExcel? === We are having problems with RExcel and I am trying to find alternatives. Our users like to use Excel and our developers like to do stats in R. So, we use Excel as a front end for data entry, analyze in R, and present results in Excel. Because of the problems we are having with RExcel, however, I would really like to have a different solution. Assuming that we cannot remove Excel or R from the equation, are there other ways of connecting them besides RExcel? My searching on the internet has not been helpful. Thanks!
0
[ 2, 98, 2676, 18, 50, 70, 80, 20, 10244, 11040, 60, 800, 3726, 3726, 95, 50, 452, 1716, 29, 10244, 11040, 17, 31, 589, 749, 20, 477, 2676, 18, 9, 318, 3878, 101, 20, 275, 20700, 17, 318, 10168, 101, 20, 107, 12819, 18, 19, 761,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
check if PropertyDescriptor has attribute === I'm trying to check if a property has the DataMemberAttribute applied (using TypeDescriptor) this is what I have now: PropertyDescriptor targetProp = targetProps[i]; var has = argetProp.Attributes.Contains( Attribute.GetCustomAttribute(typeof(DataMemberAttribute).Assembly,typeof(DataMemberAttribute))); the problem is that Attribute.GetCustomAttribute(typeof(DataMemberAttribute).Assembly,typeof(DataMemberAttribute)) returns null
0
[ 2, 2631, 100, 1354, 546, 8741, 248, 63, 35, 14755, 800, 3726, 3726, 31, 22, 79, 749, 20, 2631, 100, 21, 1354, 63, 14, 1054, 6990, 721, 14755, 2435, 13, 5, 12655, 1001, 546, 8741, 248, 6, 48, 25, 98, 31, 57, 130, 45, 1354, 546,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Objective C memory management in between two methods === i m little confused on memory management in following scenario -(NSData *)getData{ NSData *TempData = [[NSData alloc]init]; return TempData; } //in some other method NSData *NewData = [self getData]; now the question is till when NewData will be retained and how should i release it?
0
[ 2, 7038, 272, 1912, 1097, 19, 128, 81, 3195, 800, 3726, 3726, 31, 307, 265, 4230, 27, 1912, 1097, 19, 249, 12705, 13, 8, 5, 2172, 18768, 1637, 6, 3060, 18768, 1, 13, 2172, 18768, 1637, 9577, 18768, 800, 636, 2558, 2172, 18768, 65,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to access Hive using a Java API === http://wiki.apache.org/hadoop/Hive/HiveJDBCInterface - Is there a higher level ORM interface than the Hive JDBC driver which we can use to run the queries and parse the results
0
[ 2, 184, 20, 1381, 25535, 568, 21, 8247, 21, 2159, 800, 3726, 3726, 7775, 6903, 17375, 9, 7738, 2569, 9, 5583, 118, 5009, 21709, 118, 252, 1284, 118, 252, 1284, 728, 43, 7229, 6280, 6413, 13, 8, 25, 80, 21, 1184, 662, 54, 79, 657...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Close script popup from vb.net === i'm developing a win32 application in vb.net that needs to read info from some websites, using the "WebBrowser" control. The problem is that sometimes, and randomly, some popups appear while the service is reading a website, all i need is to close, or "accept" this popup so the service can continue his work. Hope anyone can help me, and thanks.
0
[ 2, 543, 3884, 1675, 576, 37, 13, 20468, 9, 2328, 800, 3726, 3726, 31, 22, 79, 3561, 21, 628, 3125, 3010, 19, 13, 20468, 9, 2328, 30, 2274, 20, 1302, 15404, 37, 109, 13931, 15, 568, 14, 13, 7, 14113, 25699, 4104, 7, 569, 9, 14,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
About bold and normal fonts === Hai guys i have an application called Task Management, In this application the employee will enter his/her task of the day, when an admin logged in all the employees task list will be displayed when he/she clicks an particular task the complete details of the task will be displayed. Now what i want is same as mails in google yahoo. i.e when an task is already viewed that task's font should be normal or else task should be bold how to achive this.
0
[ 2, 88, 5657, 17, 1826, 9978, 18, 800, 3726, 3726, 8349, 2776, 31, 57, 40, 3010, 227, 3005, 1097, 15, 19, 48, 3010, 14, 7362, 129, 2830, 33, 118, 1694, 3005, 16, 14, 208, 15, 76, 40, 21, 43, 2160, 13, 19287, 19, 65, 14, 3716, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Windows Service closed when i disconect one client socket (Threads C#) === I have a server listened on a socket. This server is a Windows Service. My problem is: When I disconnect a client "socket.Disconnect(false);" the service so closed and other clients are closed forcibly or new connections refused. I think that when service kill this client thread, the service not back to main thread. Paste my code used for service (server functionality). Is correct the management of threads? I run server with this.tcpListener = new TcpListener(ipEnd); this.listenThread = new Thread(new ThreadStart(ListenForClients)); this.listenThread.Start(); private void ListenForClients() { this.tcpListener.Start(); while (true) { //blocks until a client has connected to the server TcpClient client = this.tcpListener.AcceptTcpClient(); //create a thread to handle communication //with connected client Thread clientThread = new Thread(new ParameterizedThreadStart(HandleClientComm)); clientThread.Start(client); } } private void HandleClientComm(object client) { TcpClient tcpClient = (TcpClient)client; NetworkStream clientStream = tcpClient.GetStream(); byte[] message = new byte[4096]; int bytesRead; while (true) { bytesRead = 0; try { //blocks until a client sends a message bytesRead = clientStream.Read(message, 0, 4096); } catch { //a socket error has occured break; } if (bytesRead == 0) { //the client has disconnected from the server break; } //message has successfully been received ASCIIEncoding encoder = new ASCIIEncoding(); System.Diagnostics.Debug.WriteLine(encoder.GetString(message, 0, bytesRead)); } tcpClient.Close(); } Sorry for my bad english and thanks for any suggestion
0
[ 2, 1936, 365, 827, 76, 31, 3626, 218, 11557, 53, 6819, 18482, 13, 5, 96, 10647, 18, 272, 5910, 6, 800, 3726, 3726, 31, 57, 21, 8128, 7191, 27, 21, 18482, 9, 48, 8128, 25, 21, 1936, 365, 9, 51, 1448, 25, 45, 76, 31, 29363, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to increase the map size beyond the screen size === I am using google map view to show my current location it exactly fit to screen.Now am applying Rotate Animation on map view.While rotating the four edges are black instead of this,the whole screen should fill with map while rotating. How can do this.Is this possible by using Absolute Layout?
0
[ 2, 184, 20, 1839, 14, 2942, 1072, 1701, 14, 2324, 1072, 800, 3726, 3726, 31, 589, 568, 8144, 2942, 1418, 20, 298, 51, 866, 1474, 32, 1890, 2742, 20, 2324, 9, 1387, 589, 11989, 21448, 6236, 27, 2942, 1418, 9, 10144, 16164, 14, 222,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
If element has attribute do something else in jQuery === I'm using the qTip plugin to create tooltips for BOTH alt and title tags. The reason for doing this is because in an application I'm working on I can't convert all the alt tags on the images to title tags so have had to use both: e.g. $('*[title]').qtip({ content: { attr: 'title' }, hide: { fixed: false, event: 'click mouseleave' }, position: { target: "mouse", adjust: { x: 20, y: 10, method: "flipinvert flipinvert" }, container: false, viewport: true, at: "right center", my: "left center" }, style: { classes: "ui-tooltip-tipsy", tip: { corner: false } } }); $('img[alt]').qtip({ content: { attr: 'alt' }, hide: { fixed: false, event: 'click mouseleave' }, position: { target: "mouse", adjust: { x: 20, y: 10, method: "flipinvert flipinvert" }, container: false, viewport: true, at: "right center", my: "left center" }, style: { classes: "ui-tooltip-tipsy", tip: { corner: false } } }); The problem I have though, is that if I have a link with a title wrapping an image I will get TWO tooltips which is incorrect behaviour. My idea is to do some logic checking that if the element I am hovering has a title tag or alt tag then only do one or the other and not both. So for example if `<a href="#" title="Tooltip info"><img src="#" alt="Tooltip info"></a>` then it should use either the alt or title tag in this case. Can anyone help? Thanks example: $(*).hover(function() { if($(this).attr('title')) { // dont run the alt tag tooltip code } });
0
[ 2, 100, 4520, 63, 35, 14755, 107, 301, 962, 19, 487, 8190, 93, 800, 3726, 3726, 31, 22, 79, 568, 14, 2593, 10169, 10922, 108, 20, 1600, 5607, 10169, 18, 26, 156, 7051, 17, 581, 3383, 18, 9, 14, 1215, 26, 845, 48, 25, 185, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Secure Javascript encryption library? === I'm searching a javascript library that offers secure encryption. The client has to generate a key and all data uploaded to the server is encrypted, all data downloaded is decrypted. I need an authenticated encryption scheme, just CTR or CBC isn't enough. I heard about sjcl, but it seems that sjcl only can encrypt the whole data at once. I didn't find a way to encrypt the data blockwise. Because the uploaded files can be very large, this approach isn't feasible. I need something like the java crypto interface with two methods update() and final(). I found the nodeJS crypto library that seems to do what I need, but I don't know how to use it on browser side. I found google crypto-js, but this library doesn't seem to offer authenticated encryption but only the standard modes. Is there a way to encrypt data blockwise with sjcl? To use the nodeJS crypto library on browser side? To use authenticated encryption with crypto-js? Or is there another secure javascript library that offers what I need?
0
[ 2, 4315, 8247, 8741, 24420, 1248, 60, 800, 3726, 3726, 31, 22, 79, 5792, 21, 8247, 8741, 1248, 30, 2486, 4315, 24420, 9, 14, 6819, 63, 20, 7920, 21, 1246, 17, 65, 1054, 23782, 20, 14, 8128, 25, 29403, 15, 65, 1054, 23887, 25, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
.jsp HTML displays correctly, but, jsp code doesn't === <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%> When I go to the url of the .jsp page. The HTML code appears correctly, however, the actual jsp code doesn't. Does anyone know how to resolve this so the .jsp on the page appears correctly?
0
[ 2, 13, 9, 728, 3401, 13, 15895, 9412, 12044, 15, 47, 15, 487, 3401, 1797, 1437, 22, 38, 800, 3726, 3726, 13, 1, 11881, 1, 3383, 8326, 14315, 3726, 7, 150, 7, 13, 3594, 3726, 7, 21127, 6903, 1004, 1385, 9, 7843, 9, 960, 118, 72...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
C# - Creating an index including a column name which is a keyword === I have a C# program that creates Access MDB files. The names of the tables and columns are fixed, and I have no chance to change them. And unfortunately, one of the columns is named "Group". The code that I have written looks like: string indexSQL = buildIndexString(table.TableName); //indexSQL = "CREATE INDEX comp ON ExpFactMap([Group]);" new OleDbCommand(indexSQL, conn).ExecuteNonQuery(); When ExecuteNonQuery() is executed, I get a syntax error. The code works correctly if I use any column other than "Group". The problem seems to be that it is interpreting Group as a keyword rather than as a column name. Does anyone know how to get around this problem? In an ideal world, I would change the name of the column, but unfortunately that is not a possibility.
0
[ 2, 272, 5910, 13, 8, 2936, 40, 4348, 215, 21, 4698, 204, 56, 25, 21, 1246, 9587, 800, 3726, 3726, 31, 57, 21, 272, 5910, 625, 30, 9695, 1381, 8138, 220, 6488, 9, 14, 1817, 16, 14, 7484, 17, 7498, 50, 3535, 15, 17, 31, 57, 90...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Set MediaItem on ImageField === Currently `mediaItem.Src` is throwing an obsolete warning and states using the MediaItem property instead. The `mediaItem.MediaItem` has no setter though. Is this warning really just to get people to use something like: var image = new Sitecore.Data.Items.MediaItem(imageField.MediaItem); Sitecore.Resources.Media.MediaManager.GetMediaUrl(image); Is `.Src` (and related field properties) still the recommended way to actually set the field's value?
0
[ 2, 309, 941, 2119, 79, 27, 1961, 1109, 800, 3726, 3726, 871, 13, 1, 8260, 2119, 79, 9, 18, 5453, 1, 25, 6033, 40, 18562, 3590, 17, 202, 568, 14, 941, 2119, 79, 1354, 700, 9, 14, 13, 1, 8260, 2119, 79, 9, 8260, 2119, 79, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
OpenGL performance on Android 2.2 vs 2.3 === One of the changes introduced in Android 2.3 was: "Third-party video drivers are introduced to improve OpenGL ES operations and to increase your whole 3D graphics performance experience." Does anyone have any numbers how much faster OpenGL ES 2.0 is on Android 2.3 compared to 2.2 on various phones? I am especially interested in HTC Desire, but any values would be useful.
0
[ 2, 368, 8430, 956, 27, 13005, 172, 9, 135, 4611, 172, 9, 240, 800, 3726, 3726, 53, 16, 14, 1693, 1277, 19, 13005, 172, 9, 240, 23, 45, 13, 7, 8932, 8, 9635, 763, 5783, 50, 1277, 20, 3545, 368, 8430, 13, 160, 1311, 17, 20, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Makefile w. Protocol Buffer and Automatic Dependency === I have a Makefile something like this: .SECONDARY: NVCC = nvcc NVCCFLAGS = --gpu-architecture compute_20 CXX = g++ CXXFLAGS = -O3 -std=c++0x -Wall CXXLINT = python cpplint.py CXXLINTFLAGS = --filter=-build/include,-readability/streams,-runtime/sizeof,-whitespace/parens PROTOC = protoc PROTOCFLAGS = --cpp_out=. BINS = my_binary LIBS = -lcublas -lcusparse PROTOS = $(wildcard *.proto) SOURCES = $(wildcard *.cu) HEADERS = $(wildcard *.cuh) PBS = $(PROTOS:%.proto=%.pb) DEPS = $(SOURCES:%.cu=%.d) TESTS = my_test all: lint protos all: deps all: bins protos: ${PBS} deps: ${DEPS} bins: ${BINS} clean: rm -rf *.o *.d *.pb.cc *.pb.h ${BINS} ${TESTS} lint: ${CXXLINT} ${CXXLINTFLAGS} ${SOURCES} ${CXXLINT} ${CXXLINTFLAGS} ${HEADERS} tests: lint protos tests: deps tests: ${TESTS} tests: tests-run tests-run: ${TESTS} for f in $^; do eval "/usr/bin/time -f \"$$f runtime: %E\" ./$$f"; done %: %.o ${NVCC} ${NVCCFLAGS} -o $@ $^ ${LIBS} %.d: %.cu # ${CXXLINT} ${CXXLINTFLAGS} $*.cu ${NVCC} -M -o $*.d $*.cu %.o: %.cu ${NVCC} ${NVCCFLAGS} -c -o $@ $*.cu rm $*.d %.pb: %.proto ${PROTOC} ${PROTOCFLAGS} $*.proto ${CXX} ${CXXFLAGS} -c -o $*.pb.o $*.pb.cc ifneq ($(MAKECMDGOALS),clean) -include ${DEPS} endif The problem occurs since I can not generate my DEPS until my proto target is built. Because building the protocol buffers will add a new header file to the tree, if this isn't done first before the DEPS, the nvcc -M (make dependency) will fail since it can not find the *.pb.h that is generated. Any ideas how to fix this?
0
[ 2, 233, 16877, 619, 9, 8494, 17497, 17, 6715, 26835, 800, 3726, 3726, 31, 57, 21, 233, 16877, 301, 101, 48, 45, 13, 9, 24979, 45, 13, 20763, 3384, 800, 13, 20763, 3384, 13, 20763, 3384, 22868, 18, 800, 13, 8, 8, 263, 4201, 8, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I upgrade a socket to TLS in node? === I'm trying to write an FTP server in Node which supports TLS with explicit AUTH. In this mode, the client sends an `AUTH TLS` command to the server, which responds with an acknowledgement, prompting the client to begin negotiating a secure connection. I'm using this code to upgrade the connection: https://github.com/andris9/rai/blob/master/lib/starttls.js . I've verified that this works by writing a simple echo server using net.Server, and then using the `starttls` function to immediately upgrade the socket to a secure connection. Connecting to this test server using `openssl s_client` works as expected. However, when I try to connect to my test FTP server using an FTP client supporting TLS with explicit auth, the following exception is raised by the object returned by `createSecurePair`: [Error: 140735236446560:error:1408A0B7:SSL routines:SSL3_GET_CLIENT_HELLO:no ciphers specified:../deps/openssl/openssl/ssl/s3_srvr.c:1009: ] I have in fact specified ciphers (`createSecurePair` is passed an `options` dict with `ciphers` set to 'RC4-SHA:AES128-SHA:AES256-SHA'). I've packet-sniffed the connection, and what seems to happen is that after the server responds to the client's `AUTH TLS` command, there is a brief interchange between client and server which I assume is the (failed) SSL negotiation. But I don't really understand enough about SSL to investigate any further. How should I go about investigating the source of this error? I am running node 0.8.1, and had the same issue with 0.6.19.
0
[ 2, 184, 92, 31, 9483, 21, 18482, 20, 13, 7786, 18, 19, 15421, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 2757, 40, 1187, 306, 8128, 19, 15421, 56, 6747, 13, 7786, 18, 29, 14990, 10343, 96, 9, 19, 48, 3740, 15, 14, 6819, 11350, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Unique username and email with CakePHP Auth component === I'm new to Cake and building an application to learn it. I'm having a few troubles with my user registration system. So far this is my registration code in my `Users` controller: public function register() { $this->set('title_for_layout', 'Register'); if ($this->request->is('post')) { $this->User->create(); if ($this->User->save($this->request->data)) { $this->Session->setFlash('The user has been saved'); $this->redirect(array('action' => 'register')); } else { $this->Session->setFlash('The user could not be saved. Please, try again.'); } } } And within my `User` model I have this method where I hash the passwords: public function beforeSave() { if (isset($this->data[$this->alias]['password'])) { $this->data[$this->alias]['password'] = AuthComponent::password($this->data[$this->alias]['password']); } return true; } This works, the user is added to my `users` table in my database with their username, email and hashed password. However, there are no checks done to make sure the username and email are unique. From my limited understanding, I would need to add some validation rules to my `User` model to make sure the username and email fields are unique before they're entered into the table? At the moment I just have these validation rules: public $validate = array( 'username' => array( 'required' => array( 'rule' => array('notEmpty'), 'message' => 'A username is required' ) ), 'email' => array( 'required' => array( 'rule' => array('notEmpty'), 'message' => 'An email is required' ) ), 'password' => array( 'required' => array( 'rule' => array('notEmpty'), 'message' => 'A password is required' ) ) ); Also, my registration form has a `Password (confirm)` field called `passwordConf`. I would like to check if the user entered his passwords correctly before they're entered into the users table, but I'm not sure how to do that. I'm guessing that somewhere in my register method I need to check if the two passwords are the same. Thanks for any help.
0
[ 2, 2619, 4155, 7259, 17, 8517, 29, 8390, 26120, 10343, 96, 5912, 800, 3726, 3726, 31, 22, 79, 78, 20, 8390, 17, 353, 40, 3010, 20, 2484, 32, 9, 31, 22, 79, 452, 21, 310, 16615, 29, 51, 4155, 8587, 329, 9, 86, 463, 48, 25, 51...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Creating a thread often bad? === In Python: Is it bad, if I create a new `threading.Thread` very often? E.g. everytime a wx.SpinCtrl is clicked? I don't know of an implementation that enables you to keep the thread alive and to start the main method multiple times.
0
[ 2, 2936, 21, 9322, 478, 896, 60, 800, 3726, 3726, 19, 20059, 45, 25, 32, 896, 15, 100, 31, 1600, 21, 78, 13, 1, 96, 22883, 9, 96, 10647, 1, 253, 478, 60, 13, 62, 9, 263, 9, 352, 891, 21, 619, 396, 9, 18, 3489, 4812, 6362, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Handle NFC intents only when preference is set === I've seen several different apps (like [NFC TagInfo](https://play.google.com/store/apps/details?id=at.mroland.android.apps.nfctaginfo) and [NFC TagInfo by NXP](https://play.google.com/store/apps/details?id=com.nxp.taginfolite)) that have an option to autostart (or show up in the "select app" list) when a tag is touched *only if* that option is set in the preferences, and otherwise it seems like the intent filter is totally ignored by the system. How can this be done in an Android application?
0
[ 2, 3053, 25161, 6936, 18, 104, 76, 9808, 25, 309, 800, 3726, 3726, 31, 22, 195, 541, 238, 421, 4865, 18, 13, 5, 1403, 636, 103, 7061, 3383, 108, 4120, 500, 5, 21127, 18, 6903, 5438, 9, 16111, 4875, 9, 960, 118, 16828, 118, 7753,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Class not found for UIMA pear fle === I am new in UIMA. i am working with pear files for annotation purpose from pubmed xml file. I have already installed Julie Lab medline reader UIMA collection reader file and Lingpipe gazeteer as analysis engine. i have run CPE generator and tried to get proper annotated words but i failed to do that.. the error occurred that The class de.julielab.jules.reader.reader.MedlineReader could not be found Descripotor file=file/C:/apache-uima/examples/descriptor/collection reader/julie-medline-reader 1.7/desc/Medlinereaderdesciptor.xml causedBy: org.apache.uima.ResourceInitializationException:The class de.julielab.jules.reader.reader.MedlineReader could not be found caused by: Java.lang.classNotFound exception de.julielab.jules.reader.reader.MedlineReader It will be great help for me for giving me a way or solution to solve this error. Thank you
0
[ 2, 718, 52, 216, 26, 287, 5244, 16619, 13, 10812, 800, 3726, 3726, 31, 589, 78, 19, 287, 5244, 9, 31, 589, 638, 29, 16619, 6488, 26, 40, 1270, 857, 2131, 37, 6329, 4688, 23504, 3893, 9, 31, 57, 614, 4066, 7088, 4343, 9488, 1143,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Asymmetrical TCP encryption C# === I would like to write a client and server app which uses a tcp socket to communicate. However I do not need a cert as the users don't care who the other is. But i do need asymmetrical encryption so no one can snoop. I can't think of a way to share the symmetrical keys w/o using RSA but anyways i think i should be using SSL with TCP? What is the most way to create an SSL/TCP connection in C#? I imagine i either specify no cert or dynamically create one of the fly (but they should be throwaway...). What is the most simple way to implement it? I tried simply adding a sslstream to my tcp stream but that doesnt cut it (i get stream not readable errors). Heres my simple code so far { Thread serverThread = new Thread((ThreadStart)delegate { TcpListener listener = new TcpListener(1234); listener.Start(); using (TcpClient client = listener.AcceptTcpClient()) //using (var sslstream = client.GetStream()) using (var sslstream = new System.Net.Security.SslStream(client.GetStream(), true)) using (StreamReader reader = new StreamReader(sslstream)) using (StreamWriter writer = new StreamWriter(sslstream)) { writer.AutoFlush = true; string inputLine; while ((inputLine = reader.ReadLine()) != null) { writer.WriteLine(inputLine); } } }); serverThread.Start(); { string[] linesToSend = new string[] { "foo", "bar", "ack" }; using (TcpClient client = new TcpClient("127.0.0.1", 1234)) //using (var sslstream = client.GetStream()) using (var sslstream = new System.Net.Security.SslStream(client.GetStream(), true)) using (StreamReader reader = new StreamReader(sslstream)) using (StreamWriter writer = new StreamWriter(sslstream)) { writer.AutoFlush = true; foreach (string lineToSend in linesToSend) { Console.WriteLine("Sending to server: {0}", lineToSend); writer.WriteLine(lineToSend); string lineWeRead = reader.ReadLine(); Console.WriteLine("Received from server: {0}", lineWeRead); //Thread.Sleep(2000); // just for effect } Console.WriteLine("Client is disconnecting from server"); } } serverThread.Join(); }
0
[ 2, 21, 16367, 192, 13, 38, 7439, 24420, 272, 5910, 800, 3726, 3726, 31, 83, 101, 20, 2757, 21, 6819, 17, 8128, 4865, 56, 2027, 21, 13, 38, 7439, 18482, 20, 8709, 9, 207, 31, 107, 52, 376, 21, 13, 17580, 28, 14, 3878, 221, 22, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Initializing a Dictionary<string, string> while chaining constructors === I'm trying to design a system of chaining constructors in a way that I think may not be possible, but I want to check first. I've got 5 overloaded constructors as follows: public SqlCeDB(string filename) public SqlCeDb(string filename, Dictionary<string, string> options) public SqlCeDB(string filename, string password) public SqlCeDB(string filename, string password, Dictionary<string, string> options) public SqlCeDB(Dictionary<string, string> options) I want to have all the logic built into the last constructor and have the others pass control to it. Right now I have a working first constructor as follows: public SqlCeDB(string filename) : this(new Dictionary<string, string> { { "DataSource", filename } }) { } But is there a way to do this for the second? I want to create a new Dictionary<string, string> as above, but I would also need to copy the options that are already in the existing Dictionary called "options".
0
[ 2, 2104, 3335, 21, 9186, 1, 11130, 15, 3724, 1, 133, 2858, 68, 6960, 248, 18, 800, 3726, 3726, 31, 22, 79, 749, 20, 704, 21, 329, 16, 2858, 68, 6960, 248, 18, 19, 21, 161, 30, 31, 277, 123, 52, 44, 938, 15, 47, 31, 259, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
empty localStorage before headers are set === is there any way to empty localStorage (defined in html5) through php? I need something like this: <script type="text/javascript"> window.localStorage.clear(); </script> <?php header('Location: '.$adress); ?> But unfortunately its not possible to call javascript before headers :( Any idea how to solve this?
0
[ 2, 2424, 375, 18, 2153, 1303, 115, 157, 445, 50, 309, 800, 3726, 3726, 25, 80, 186, 161, 20, 2424, 375, 18, 2153, 1303, 13, 5, 13439, 19, 13, 15895, 264, 6, 120, 13, 26120, 60, 31, 376, 301, 101, 48, 45, 13, 1, 8741, 1001, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Store cardholder data in PayPal or other service provider? === I'm working on a e-commerce website with PayPal direct payment. Our customers are supposed to enter their credit card information in the page that hosted by PayPal, so that our server will NEVER touch the cardholder data. Our problem is that we want to provide the convenience so that the returning customer don't have to enter credit card information every time, and we don't want to store or even touch the cardholder data. Instead, we want to store this sensitive data in PayPal so that next time we can just provide something like a CustomerID to ask PayPal access the credit card information to complete the purchase. Is that possible to do with PayPal or other service provider? PS. We also tried Intuit Payment Wallet. It can store the cardholder data but it need us to transmit these data to their server to create a "wallet".
0
[ 2, 1718, 2056, 12427, 1054, 19, 1372, 6720, 54, 89, 365, 11747, 60, 800, 3726, 3726, 31, 22, 79, 638, 27, 21, 13, 62, 8, 26470, 2271, 29, 1372, 6720, 1744, 7582, 9, 318, 5279, 50, 2293, 20, 2830, 66, 3251, 2056, 676, 19, 14, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rails DateTime date from string -> invalid date === I'm currently working on a rails project and I need to create a DateTime object from a string. Currently I have the following code: datetime = DateTime.strptime(items[0] << 'T' << items[1], '%d.%m.%YT%H:%M:%S') The string created by items[0] << 'T' << items[1] is for example 25.01.2012T18:25:47 But the I get the following error message "invalid date" If I print the string to the rails server console it seems to be correct, but I have no idea why the conversion to a DateTime object fails... Does anyone got an idea? Best regards
0
[ 2, 2240, 18, 1231, 891, 1231, 37, 3724, 13, 8, 1, 16671, 1231, 800, 3726, 3726, 31, 22, 79, 871, 638, 27, 21, 2240, 18, 669, 17, 31, 376, 20, 1600, 21, 1231, 891, 3095, 37, 21, 3724, 9, 871, 31, 57, 14, 249, 1797, 45, 1231, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...