text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I want to count string separators from a MySQL query, mean if the field value is
like :-
```
1,2,3,4,5
```
as the string is comma separated so the separator count will be 4.
any idea then please share
THANKS,
you can try to count the length of string and minus the length of string without commas as follows:
``... | [
0.15069299936294556,
0.21694089472293854,
0.38834431767463684,
-0.03928976505994797,
-0.14269796013832092,
0.19935615360736847,
0.09394128620624542,
-0.21807299554347992,
-0.12303688377141953,
-0.2796683609485626,
0.03600649908185005,
0.5764322280883789,
-0.2895677983760834,
0.045768413692... | |
Basically I am trying to create a little program that will allow me to make calls in matlab from a jave GUI
It's mainly going to be used for image manipulation and deblurring but I am struggling to find a way that will effectively give me full matlab control from the java end
I am hoping to have it work like so:
```... | [
0.330615758895874,
-0.03492247685790062,
0.3298759460449219,
-0.08596041798591614,
-0.2784016728401184,
-0.07104914635419846,
0.16904132068157196,
-0.15152683854103088,
-0.28380629420280457,
-0.7108961343765259,
0.012861686758697033,
0.6752846240997314,
-0.5958133935928345,
-0.079975701868... | |
the newly created variable
resultingVariablePath = java.sendInstructionToMatlab(loadImage);
//display on the screen
java.displayImage(resultingVariablePath);
}
```
Basically I am just trying to find out if there is a plugin for matlab (or some java package) that will grant you (pretty much) full control ... | [
-0.20857422053813934,
0.018698425963521004,
0.6329292058944702,
-0.07404687255620956,
-0.16995838284492493,
-0.3781783878803253,
0.4516770839691162,
-0.1876983940601349,
-0.2502480149269104,
-0.6170921921730042,
-0.10140412300825119,
0.831106424331665,
-0.21847258508205414,
0.1943766474723... | |
I'm creating a iPhone app, and im trying to figure out how to create a JSON request to the webservice that contains parameters. In Java this would look like this
```
HashMap<String, String> headers = new HashMap<String, String>();
JSONObject json = new JSONObject();
json.put("nid", null);
jso... | [
0.42100992798805237,
-0.029377693310379982,
0.20728494226932526,
-0.307049959897995,
0.034903377294540405,
0.22310997545719147,
0.6291799545288086,
0.04503442719578743,
-0.02582607790827751,
-0.7975302934646606,
-0.24257361888885498,
0.48470285534858704,
-0.4824826121330261,
-0.20357145369... | |
json.put("md5pw", password); // donkeykong
headers.put("X-FBR-App", json.toString());
```
The header has to contain a JSON object and "X-FBR-App" before the service recognizes the request. How would this be implemented in Objective-C ?
You need to get [Cipher](http://docs.oracle.com/javase/6/docs/api/javax/c... | [
-0.01760314591228962,
0.17238351702690125,
0.31641435623168945,
-0.12215440720319748,
-0.032339099794626236,
0.1621502786874771,
0.19013182818889618,
-0.5432974100112915,
-0.3564966320991516,
-0.5212926268577576,
-0.3753761351108551,
0.3040808439254761,
-0.27332812547683716,
-0.25794389843... | |
key, ivSpec);
```
Once you have `Cipher` object in decrypt mode, you can feed it with encrypted data using [`update`](http://docs.oracle.com/javase/6/docs/api/javax/crypto/Cipher.html#update%28byte%5b%5d%29) methods, and it will return you plain-text data. When you are done, you must call one of [`doFinal`](http://do... | [
0.09095076471567154,
-0.06910426914691925,
0.5709643959999084,
-0.010852771811187267,
0.07056646794080734,
-0.06571521610021591,
0.3092268407344818,
-0.5895536541938782,
-0.10980791598558426,
-0.31434395909309387,
-0.40447714924812317,
0.6529554128646851,
-0.3698238134384155,
0.02957933954... | |
C# code:
```
// Algorithm, mode and padding must match encryption.
// Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING");
// If you have Bouncycastle library installed, you can use
// Rijndael/CBC/PKCS7PADDING directly.
Cipher cipher = Cipher.getInstance("Rijndael/CBC/PKCS7PADDING");
// convertedSecureString... | [
-0.48092249035835266,
-0.0037680084351450205,
0.40098607540130615,
-0.29517069458961487,
-0.09535271674394608,
-0.051954787224531174,
0.4495723843574524,
-0.4433486759662628,
-0.1974440962076187,
-0.5311952233314514,
-0.24335545301437378,
0.592418909072876,
-0.453340083360672,
-0.149459943... | |
the other answer) and PKCS7 padding. You will need to install Bouncycastle extension for that and then just use `Cipher.getInstance("Rijndael/CBC/PKCS7PADDING");`. Why CBC and PKCS7 Padding? Those seem to be defaults for [System.Security.Cryptography.Rijndael](http://msdn.microsoft.com/en-us/library/system.security.cry... | [
-0.1000455915927887,
-0.06148773059248924,
0.5291371941566467,
0.05224305018782616,
0.1618065983057022,
-0.1794677972793579,
0.7021962404251099,
-0.26087579131126404,
-0.4034908711910248,
-0.6072434186935425,
-0.38555583357810974,
0.6624357104301453,
-0.09422707557678223,
-0.20906113088130... | |
I have used Form Authentication in my web project.I don't want Form Authentication for two pages.How can i avoid this ?.
Write the following location tags replace Logout.aspx and Login.aspx page names with your two pages name.
```
<location path="Logout.aspx">
<system.web>
<authorization>
<allow users="*" ... | [
0.22170580923557281,
0.15386778116226196,
0.8152315020561218,
-0.052488528192043304,
0.05380550026893616,
-0.08847582340240479,
0.14307241141796112,
-0.3325809836387634,
-0.17660555243492126,
-1.0671746730804443,
-0.0442076101899147,
0.15013524889945984,
-0.25446614623069763,
-0.1185616999... | |
I use activity with ImageView, and by click on button it switches to activity with VideoWiew and plays movie, the movies first frame is the image on previous activity. I disabled animation between activity by using
```
Intent intent = new Intent(ImageClass.this, MovieClass.class);
intent.addFlags(Intent.FLAG_ACTIVITY_... | [
0.5094684958457947,
-0.4358590245246887,
0.7197367548942566,
-0.012064848095178604,
-0.13470841944217682,
-0.2529338002204895,
0.45989200472831726,
-0.10818841308355331,
-0.25397351384162903,
-0.6602615714073181,
-0.03331661969423294,
0.8452293872833252,
-0.3337842524051666,
-0.23665164411... | |
user to interact. Further, I would suggest you to move all the heavy lifting in **AsyncTask** for smoother UI experience. | [
0.0821462944149971,
0.07725626230239868,
0.3808777630329132,
0.4559728503227234,
-0.37313637137413025,
-0.11967824399471283,
-0.16253407299518585,
0.08888323605060577,
-0.07337561249732971,
-1.022253155708313,
-0.19855554401874542,
0.6531404852867126,
0.09256608039140701,
0.064291641116142... | |
I have created a Facebook Canvas App. This canvas app is essentially an image library, the user is able to view images by clicking a 'Next' button - pretty simple.
I am using the Graph API to post to a custom object when a user has 'looked at' an image. I do this like so (PHP SDK):
```
$this->data['facebook']->api('/... | [
0.41738709807395935,
0.15104080736637115,
0.7798036336898804,
-0.2998925447463989,
-0.2747741937637329,
0.12015536427497864,
-0.05556023120880127,
-0.012068727985024452,
-0.45881399512290955,
-0.8564149737358093,
0.07868670672178268,
0.37615182995796204,
-0.09571310877799988,
0.13487705588... | |
content="Pic of <?=$image->title?>" />
<meta property="og:image" content="https://www.***.com/***/images/<?=$image->src?>" />
<meta property="fb:app_id" content="<?=FB_APP_ID?>" />
<meta property="og:url" content="<?=current_url();?>" />
<meta property="og:type" content="myapp:picture" />
```
I have read ... | [
0.02946561574935913,
0.30276376008987427,
0.6433407068252563,
-0.1513535976409912,
-0.17467603087425232,
0.16067615151405334,
0.12584619224071503,
-0.28564950823783875,
-0.31589412689208984,
-0.9976816773414612,
-0.13824976980686188,
0.5383322834968567,
-0.272922545671463,
0.05499722063541... | |
from Facebook:
```
Fatal error: Uncaught OAuthException: (#3502) Object at URL https://apps.facebook.com/myapp/image/img/id has og:type of 'website'. The property 'picture' requires an object of og:type 'myapp:picture'. thrown in /****/application/libraries/base_facebook.php on line 1106
```
If I use Facebook's debu... | [
0.3812467157840729,
0.27846062183380127,
0.37595635652542114,
0.03772770240902901,
-0.22723732888698578,
-0.005274795461446047,
0.34746691584587097,
-0.12471441179513931,
-0.3918951451778412,
-0.6458964943885803,
-0.10512958467006683,
0.5317308902740479,
-0.29972532391548157,
-0.0007203184... | |
in the third block of code above (file\_get\_contents) without luck.
I guess my question would be: Am I going about this in the right way? I am struggling to find any clear documentation on the process when it is used in this way.
If I am going about it the right way, why is my page not being scraped when calling fil... | [
0.2668509781360626,
0.20221148431301117,
0.4291512370109558,
-0.0933067575097084,
-0.384319543838501,
-0.12848813831806183,
0.30223432183265686,
0.06280474364757538,
-0.4407135546207428,
-0.7587219476699829,
0.10787880420684814,
0.4079020917415619,
-0.24236904084682465,
0.12155357748270035... | |
I have started using the"display:table" property in CSS to properly structure my html5 elements, and it works great.
Can someone tell my why using floats is better? Ironically, it seems like this is the future? It's easy, simple and understandable?
As long as a table layout works for you, you can use it.
However, it ... | [
0.8585584163665771,
0.18490269780158997,
0.3046009838581085,
0.13207793235778809,
-0.3048764169216156,
-0.17833194136619568,
0.008869946002960205,
-0.06455481797456741,
-0.20050100982189178,
-0.8392052054405212,
0.26535695791244507,
0.3250223994255066,
-0.11331916600465775,
0.1867866814136... | |
I have a strange problem.
I have an iPad with iOS 5.0.1 (9A405) and iOS SDK 5.0.1 with Xcode 4.2 (Build 4C199) installed on my Mac.
Xcode doesn't see my device. It says "iOS Device" not "Sauron's iPad" as usual.
(I am sure that device is connected because I see it in iTunes.)
Xcode denies to start my application o... | [
-0.02822723798453808,
0.3331975042819977,
0.6521605849266052,
-0.021926283836364746,
0.26669228076934814,
0.2504274845123291,
0.4244121313095093,
0.08374246209859848,
-0.3152792751789093,
-0.5730238556861877,
0.010354626923799515,
0.26459068059921265,
-0.5023528337478638,
0.219769254326820... | |
iOS simulator as the destination."
Xcode sees my other iPad with iOS 4.3.3 and can run applications on this device.
I have tried to restart my Mac - without result.
I also checked provisioning profile, developer certificate, etc.
Does anybody have ideas?
1. Select Window ➜ Organizer in Xcode.
Now under Devices, sel... | [
0.11186479777097702,
-0.2871176302433014,
0.6092984676361084,
0.23448783159255981,
0.35816091299057007,
0.009431680664420128,
0.08177430927753448,
-0.011887959204614162,
-0.01368611492216587,
-0.9322518706321716,
0.0715949609875679,
0.5430793762207031,
-0.26444050669670105,
-0.234681531786... | |
is added in the provisioning profile you are using. | [
0.6569042205810547,
-0.18409615755081177,
0.22432784736156464,
-0.05969703942537308,
0.3533523380756378,
-0.0009365902515128255,
-0.27692246437072754,
0.29081299901008606,
-0.17640243470668793,
-0.8675896525382996,
-0.31460556387901306,
0.25250983238220215,
0.17212970554828644,
-0.11478503... | |
How can I return `1` if the SQL below returns `NULL`?
Something like (pseudo code):
```
if sql return NULL value
then set value to one
otherwise returning sql result value.
```
Is there any SQL for defining default value to 1 if SQL result is NULL?
```
SELECT Max(iCategoryOrder)+1
FROM [IVRFlowManager].[db... | [
-0.0785234123468399,
-0.25981584191322327,
0.3005455434322357,
-0.11682099103927612,
-0.08200247585773468,
-0.08179900795221329,
0.055958203971385956,
-0.3734667897224426,
-0.09965222328901291,
-0.29249316453933716,
-0.07737332582473755,
0.546195924282074,
-0.4053601920604706,
-0.097326785... | |
I am trying to index Wikipedia's dump. In order to provide abstract for the articles (or, maybe, enable highlighting feature in future) I'd like to store their text without WikiMarkup. For the first try, it would be enough for me to leave just alphanumeric symbols. So the question is it possible to store the field, tha... | [
0.33342018723487854,
0.045168060809373856,
0.2897099554538727,
0.05461062490940094,
-0.3871380388736725,
-0.3590371310710907,
0.03402312472462654,
0.145168736577034,
-0.054218314588069916,
-0.7052057385444641,
-0.02644365094602108,
0.25640061497688293,
-0.3270603120326996,
-0.0536527261137... | |
this would be to pre-process the document before sending it to Solr. | [
0.4461241066455841,
0.2349989116191864,
0.29482075572013855,
0.20957379043102264,
0.06145000830292702,
-0.053168751299381256,
-0.3523275554180145,
-0.1722351461648941,
-0.013655823655426502,
-0.3119463324546814,
-0.38912340998649597,
0.3225128948688507,
0.20988120138645172,
-0.053758140653... | |
```
public class Main
{
public static void main(String []ar)
{
A m = new A();
System.out.println(m.getNull().getValue());
}
}
class A
{
A getNull()
{
return null;
}
static int getValue()
{
return 1;
}
}
```
I came across this question in an SCJP book. The code prin... | [
-0.2253684252500534,
-0.02357192151248455,
0.14114442467689514,
-0.5049994587898254,
-0.039162471890449524,
0.1564774215221405,
0.409109503030777,
-0.07669023424386978,
-0.4327443540096283,
-0.3662967085838318,
-0.5940332412719727,
0.3314030170440674,
-0.621524453163147,
0.4732461571693420... | |
it should according to the [Java Language Specification](http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#d5e19846):
> a null reference may be used to access a class (static) variable without causing an exception. | [
-0.01800219714641571,
0.10299781709909439,
0.13475820422172546,
0.0903996005654335,
0.1000584214925766,
-0.21156632900238037,
0.23678557574748993,
-0.008425855077803135,
-0.02200820855796337,
-0.1376604586839676,
-0.17424501478672028,
0.10279842466115952,
-0.3923455476760864,
0.38495859503... | |
I designed plain html site,with one enquiry form.It has some fields like name ,address etc.
Onclick of **submit** button,i wanted this data to go into the database.
I created database and table using **phpmyadmin** on **XAMPP** server.
My code is as follows(hello.php):
```
<script>
function insert_db()
{
<?php
... | [
0.10830428451299667,
0.2793377935886383,
0.2933192849159241,
-0.3967946469783783,
-0.05198521539568901,
0.2128276228904724,
0.1687842756509781,
-0.09853138774633408,
0.11030760407447815,
-0.6274505853652954,
0.12907248735427856,
0.4446066915988922,
-0.48436081409454346,
0.1525365710258484,... | |
name="name" /><br />
<input type="submit" name="mysubmit" value="Submit" onclick="insert_db()"/>
```
On click of **submit** button ,**two entries** are made into the database.One is blank and other is entered value.
how to call the function only once??Is there any other way out..
You can't mix php and javascript ... | [
0.07944867759943008,
0.14653418958187103,
0.5222777724266052,
-0.0007362114265561104,
-0.3359872102737427,
-0.04235164448618889,
0.15398922562599182,
-0.40492159128189087,
0.07878753542900085,
-0.6345256567001343,
0.13590756058692932,
0.2472669631242752,
-0.27580633759498596,
0.27604091167... | |
empty, submit the form to the server and evaluate the PHP code again, this time with the desired effect.
A proper way to do this would be:
```
<?php
if (!empty($_POST['name'])){ // check if form values are there
$username = $_POST['name'];
print ($username);
mysql_connect("localhost","root","");
mysql... | [
-0.001897916430607438,
0.1432105302810669,
0.588035523891449,
-0.21541018784046173,
-0.2031174749135971,
-0.17682203650474548,
0.29350996017456055,
-0.47216564416885376,
0.08657586574554443,
-0.6805448532104492,
-0.13089029490947723,
0.42244449257850647,
-0.1446312665939331,
0.063085652887... | |
In my project ("Xcode 4.3.2 - Single View Application"), I have manually added a ToolBar with a button item, i need to update the button label programatically.
How can i do this? Could you please help me?
ViewController.h
```
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController <UIWebViewDelegate>{
... | [
0.3248610198497772,
0.07907174527645111,
0.6137045621871948,
-0.008828370831906796,
-0.12632662057876587,
-0.11409047245979309,
0.3384859561920166,
-0.5684765577316284,
0.05609000474214554,
-0.9508123993873596,
-0.10054793208837509,
0.37680551409721375,
-0.2815801799297333,
0.1861725747585... | |
BarButtonItem as Referencing Outlet "barButton" | [
0.7025397419929504,
0.2074705958366394,
0.1590893417596817,
-0.2905215322971344,
-0.309173583984375,
0.06737980246543884,
0.11179821193218231,
0.3433852791786194,
-0.07667849957942963,
-0.1344687044620514,
-0.23436293005943298,
0.36997807025909424,
-0.10504160076379776,
0.33669403195381165... | |
I always get error when use flymake-mode. And flymake-mode turn off.

So I want to check whether flymake-mode is on. If it is not on, I will turn it on before call flymake-next-error.
Thanks.
Most minor modes are defined using the `define-minor-mode... | [
0.20857752859592438,
-0.21826103329658508,
0.37728023529052734,
-0.1911611557006836,
0.3302101790904999,
-0.1280624270439148,
0.44331955909729004,
0.1468038111925125,
-0.08896023035049438,
-0.7072420716285706,
-0.09430227428674698,
0.9009667038917542,
-0.42881038784980774,
0.23098807036876... | |
been enabled):
```el
(and (boundp 'flymake-mode) flymake-mode)
```
Which, as Thom point out in the comments, can be expressed using the convenient macro:
```el
(bound-and-true-p flymake-mode)
```
Which we can use as the condition for an `if` or `when` or `unless` expression:
```el
(if (bound-and-true-p flymake-m... | [
-0.2335473895072937,
-0.1128394603729248,
0.7436638474464417,
-0.195612832903862,
0.5607900619506836,
0.015250613912940025,
-0.16188554465770721,
-0.07056266814470291,
-0.021019328385591507,
-0.6754969358444214,
-0.6101257801055908,
0.8540719747543335,
-0.26717349886894226,
-0.158854603767... | |
I've got a lot of objects, every one has some tags, which are stored in NSDictionary. I've also got a loop, in which I'm iterating through all objects and do some stuff depending on object's tags. Method objectForKey: worsens performance a lot, if there are too many calls of it. How can I improve the performance? I've ... | [
0.43415066599845886,
-0.09787559509277344,
0.11149699985980988,
0.12060701847076416,
-0.13844868540763855,
-0.1569715440273285,
0.6675882935523987,
-0.1350158005952835,
-0.3202413320541382,
-0.6720273494720459,
0.13838335871696472,
0.4152490794658661,
-0.02104925364255905,
0.03523246198892... | |
in objectForKey:, not in doSomeStuff:. Can It be because of amount of its calls? Tags have got few objects, about 10 for each object, but the amount of objects is rather large
.h:
```
@interface MyObject : NSObject
@property (nonatomic, readwrite, strong/*copy*/ ) NSDictionary *tags;
-(void)doSomeStuff;
@end
```... | [
-0.0014873486943542957,
-0.2704155445098877,
0.5016196370124817,
-0.04875491186976433,
-0.07523173093795776,
-0.005379056092351675,
0.3395457863807678,
-0.7063273191452026,
-0.2696230411529541,
-0.8147527575492859,
-0.31298887729644775,
0.5955298542976379,
-0.4670815169811249,
-0.271266430... | |
for (NSArray *rule in rules)
{
for (NSString *ruleString in rule.Strings)
{
// there is a more complicated check in my project, so you may imagine that there are 10 calls of objectForKey:, with different keys
if ([object objectForKey:ruleString] isEqualToString:@"yes"])
... | [
-0.06339488923549652,
-0.43751248717308044,
0.23352138698101044,
0.09735037386417389,
0.2537848651409149,
-0.07255276292562485,
0.4745827317237854,
-0.531356692314148,
-0.3554052412509918,
-0.3940417468547821,
-0.1612015664577484,
0.5288944244384766,
-0.42704489827156067,
-0.05979555472731... | |
[object doSomeStuff];
}
}
}
}
```
If `objectForKey` is slow, your best bet might well be to create a custom (more efficient) implementation of `hash` for the objects that you're adding. It's possible that the default implementation is creating lots of clashes which is likely to affect performan... | [
0.0333544947206974,
-0.054358359426259995,
0.1068967655301094,
0.03549358993768692,
-0.00960949994623661,
-0.1676144301891327,
0.28216424584388733,
-0.053723521530628204,
-0.20446564257144928,
-0.9193118214607239,
0.0005190317169763148,
0.7972201704978943,
-0.310058057308197,
0.09368191659... | |
guess. In general, NSDictionary is pretty efficient.
*Edit*: To clarify based on the extra information you added... I don't think this is about improving the performance of NSDictionary. Given your numbers, you're calling `objectForKey:` over half a million times; of course this is going to be the most demanding opera... | [
-0.016395099461078644,
-0.17897368967533112,
0.0798935666680336,
0.16517788171768188,
0.18820813298225403,
0.017719930037856102,
0.32761746644973755,
0.05513019859790802,
-0.26410338282585144,
-0.7924473285675049,
0.21365253627300262,
0.7375054955482483,
-0.21414802968502045,
-0.2694682776... | |
I have a Visual Studio project that was originally configured to build using the Release|Any CPU build configuration.
I need to change this so all the assemblies are built using Release|x86.
I can change this in Visual Studio but how do I specify the equivalent in my nant build script?
**EDIT**: I am building my ass... | [
0.5371586680412292,
0.3719451129436493,
0.0506591834127903,
-0.37335819005966187,
-0.2646726667881012,
-0.08720823377370834,
0.27768391370773315,
0.003869450418278575,
-0.3350357711315155,
-0.7076489925384521,
0.07724379748106003,
0.4578064978122711,
-0.3603794276714325,
0.0774573609232902... | |
do this from NAnt, with the `<exec>` task. `CorFlags` is installed as part of the SDK, so you should have it already. | [
0.20386990904808044,
0.1325961798429489,
0.04909185692667961,
-0.04035716503858566,
0.0504656545817852,
-0.5119655728340149,
-0.02876456454396248,
0.3165551424026489,
-0.19651643931865692,
-0.5325836539268494,
-0.3926616907119751,
0.24843578040599823,
-0.2173061966896057,
-0.02574094571173... | |
I have scripts which need different configuration data. Most of the time it is a table format or a list of parameters. For the moment I read out excel tables for this.
However, not only reading excel is slightly buggy (excel is just not made for being a stable data provider), but also I'd like to include some data vali... | [
0.6438484191894531,
0.2020295411348343,
-0.04118020832538605,
0.42696642875671387,
-0.0580328069627285,
-0.21076957881450653,
0.032774899154901505,
0.0599813275039196,
-0.16313008964061737,
-0.7247709631919861,
0.2663414776325226,
0.6179004907608032,
-0.04697262495756149,
-0.25366741418838... | |
to realize that? Of course one could program complicating web interfaces and form, but maybe that's too much effort?!
Was is an easy to edit way to provide data tables and other configuration parameters?
The configuration info is just small tables with a list of parameters or a matrix with mathematical coefficients.
M... | [
0.08331435918807983,
0.0543334037065506,
0.3892631232738495,
-0.05394416302442551,
-0.17470015585422516,
-0.12291717529296875,
0.01595844142138958,
-0.13613776862621307,
-0.3189168870449066,
-0.5982058644294739,
0.06394748389720917,
0.29916301369667053,
-0.220473974943161,
0.08885037153959... | |
task. `CorFlags` is installed as part of the SDK, so you should have it already. | [
0.22437341511249542,
0.13237622380256653,
0.23690544068813324,
0.12356431037187576,
0.011767467483878136,
-0.4273044764995575,
-0.001574882073327899,
-0.05460895225405693,
-0.3677138686180115,
-0.40679219365119934,
-0.39962172508239746,
0.4839174747467041,
-0.09074164181947708,
-0.05752541... | |
I'm trying to learn about Core Data and am following the "Locations" tutorial from Apple. One immediate stumbling block i've come across is that I have already started constructing the application that i want to use Core Data with. It is a single view application.
What are the steps I need to take in order to utilize ... | [
0.398457795381546,
0.17751674354076385,
0.10127414017915726,
0.07386571913957596,
0.2028287798166275,
0.03908677026629448,
0.06391321867704391,
0.2363399714231491,
-0.0857592299580574,
-0.7733917236328125,
0.04976895451545715,
0.3511528968811035,
-0.14831361174583435,
0.11096081137657166,
... | |
Application named CoreDataTutorial.
2.) Add the core data framework to the project. Right click on Frameworks, select Add > Existing Frameworks … find CoreData.frameworks and click add.
3.) Add a Data Model to the project. Right click on Resources, select Add > New File … under iOS choose Resource and then select Dat... | [
0.11040538549423218,
-0.006989979185163975,
0.6254131197929382,
0.3440539538860321,
0.390324205160141,
-0.012734698131680489,
0.09479696303606033,
-0.2943814992904663,
0.12608608603477478,
-0.7343415021896362,
-0.04504214599728584,
0.3851180374622345,
-0.30236145853996277,
0.19730356335639... | |
right pane.
While the entity is still selected, click the + symbol in the top middle pane and choose Add Attribute.Name this Attribute “some\_attribute\_name” and set it to type String.
5.) Now we are going to create relationships between our two entities. Select your entity in the entity pane. Click the + symbol in ... | [
0.2909226715564728,
0.06931893527507782,
0.62223219871521,
0.07735291868448257,
0.48742616176605225,
0.2583378255367279,
-0.04910949245095253,
-0.41469165682792664,
0.009149638935923576,
-0.6327956914901733,
-0.08215663582086563,
0.5654163956642151,
-0.3739745616912842,
0.5921810269355774,... | |
set the Destination to Artist, set the Inverse to release and the Delete Rule to Cascade.
You can now close the object editor.
6.) Expand Other Sources and double click CoreDataTutorial\_Prefix.pch. Add an import for CoreData.
```
#ifdef __OBJC__
#import <foundation foundation.h="">
#import <uikit uikit.h=""... | [
0.1013624519109726,
-0.18772488832473755,
0.635999858379364,
0.04363072291016579,
0.15065260231494904,
0.1485036462545395,
0.21187463402748108,
-0.37574705481529236,
-0.19074706733226776,
-1.0494177341461182,
-0.18069308996200562,
0.4601220488548279,
-0.4906049072742462,
-0.076015613973140... | |
declare an action named applicationDocumentsDirectory, this action gets the path to the condiments directory where our data will be stored in a SQLite file. And an action that saves the context when the app quits.
Here’s what the header file looks like when we’re done. Remember we added the import statement to the Cor... | [
0.007171136327087879,
-0.013431423343718052,
0.6856464147567749,
-0.015475263819098473,
0.3156134784221649,
0.1627448946237564,
0.29766571521759033,
-0.34947988390922546,
-0.39686959981918335,
-0.7009088397026062,
-0.37736377120018005,
0.6579393744468689,
-0.3988988697528839,
-0.0376633368... | |
(nonatomic, retain) IBOutlet CoreDataTutorialViewController *viewController;
@property (nonatomic, retain, readonly) NSManagedObjectContext *managedObjectContext;
@property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel;
@property (nonatomic, retain, readonly) NSPersistentStoreCoordinator *pers... | [
-0.3267969489097595,
0.03530147299170494,
0.5848710536956787,
0.1001075953245163,
0.21116302907466888,
-0.09433344751596451,
0.27901220321655273,
-0.5025954246520996,
-0.15307070314884186,
-0.7897549271583557,
-0.39189133048057556,
0.7538184523582458,
0.009898632764816284,
0.29164707660675... | |
&& ![managedObjectContext save:&error])
{
/*
Replace this implementation with code to handle the error appropriately.
abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be usefu... | [
0.013513196259737015,
-0.05220126733183861,
0.3043307662010193,
-0.11271578818559647,
0.5669684410095215,
-0.19534572958946228,
0.5381113290786743,
0.06920406967401505,
-0.31499648094177246,
-0.39154839515686035,
-0.4421338737010956,
0.7122030854225159,
-0.36530593037605286,
0.111456185579... | |
that instructs the user to quit the application by pressing the Home button.
*/
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
abort();
}
}
}
```
11.) Finally implement your accessors methods for your variables and that's it. | [
-0.05585820600390434,
0.27230972051620483,
0.49775269627571106,
-0.23914839327335358,
0.5162127017974854,
-0.3164351284503937,
0.5508037805557251,
0.05089205503463745,
0.07295718789100647,
-0.39626502990722656,
-0.33269718289375305,
0.7644011378288269,
-0.3055211901664734,
0.37912848591804... | |
I want to restrict creating object using default constructor. Because I have a desing like below:
```
class Program
{
static void Main(string[] args)
{
BaseClass bc = new BaseClass("","");
XmlSerializer xml = new XmlSerializer(typeof(BaseClass));
StreamWriter sw = new StreamWriter(File.... | [
0.3186192214488983,
-0.0932953879237175,
0.5129854679107666,
-0.11982676386833191,
0.23570680618286133,
-0.012238999828696251,
0.33829596638679504,
-0.10679104179143906,
0.026279296725988388,
-0.7362422347068787,
-0.06283816695213318,
0.5253688097000122,
-0.3603023290634155,
0.443031191825... | |
Password;
// I don't want to create default constructor because of Authentication
public BaseClass(string _UserName, string _Password)
{
UserName = _UserName;
Password = _Password;
f_Authenticate();
}
private void f_Authenticate() { }
}
public class DerivedClass:BaseClass
{
... | [
-0.17438313364982605,
-0.1569850593805313,
0.4334224760532379,
-0.04863440617918968,
0.18298554420471191,
-0.25798937678337097,
0.3619118630886078,
-0.21866561472415924,
-0.018122192472219467,
-0.44862279295921326,
-0.2073432356119156,
0.6162938475608826,
-0.23313666880130768,
0.2537561953... | |
error:
`Unhandled Exception: System.InvalidOperationException: ConsoleApplication1.BaseC
lass cannot be serialized because it does not have a parameterless constructor.`
Now my design is collapsing because I need to have `Username`, `Password` parameters but default constructor is ruining my design....
What should I ... | [
-0.38036152720451355,
-0.05802538990974426,
0.5552800893783569,
0.08260075747966766,
-0.024414118379354477,
0.01087369117885828,
0.7343012094497681,
-0.04341045767068863,
-0.3636188209056854,
-0.7243601083755493,
-0.008606350980699062,
0.5695055723190308,
-0.3117772936820984,
0.35228949785... | |
I am doing an exam paper for revision. It's not a particular question I want help with, but I am unsure to why the program is outputting incorrectly when certain data is entered.
```
def Binary(Hex):
Result = ''
ErrorFound = False
BinaryEquivalent = ''
EmptyInput=""
for ThisHexDigit in Hex:
... | [
-0.1756524294614792,
0.3654343783855438,
0.18419590592384338,
-0.040554724633693695,
0.20862063765525818,
0.2069026380777359,
0.4011118412017822,
-0.3137567341327667,
-0.10761973261833191,
-0.2656972110271454,
-0.3770015835762024,
0.42592722177505493,
-0.31914088129997253,
0.14217735826969... | |
elif ThisHexDigit == '1': BinaryEquivalent = '1'
elif ThisHexDigit == '2': BinaryEquivalent = '2'
elif ThisHexDigit == '3': BinaryEquivalent = '3'
elif ThisHexDigit == '4': BinaryEquivalent = '4'
elif ThisHexDigit == '5': BinaryEquivalent = '5'
elif ThisHexDig... | [
-0.13950231671333313,
0.5847455263137817,
-0.2841549217700958,
-0.4473794996738434,
-0.41946709156036377,
0.7129389643669128,
0.6086162328720093,
-0.5643849968910217,
0.0663335844874382,
-0.49479788541793823,
-0.5468286871910095,
0.10112621635198593,
-0.4808059632778168,
-0.325644880533218... | |
elif ThisHexDigit == '7': BinaryEquivalent = '7'
elif ThisHexDigit == '8': BinaryEquivalent = '8'
elif ThisHexDigit == '9': BinaryEquivalent = '9'
elif ThisHexDigit == 'A': BinaryEquivalent = '10'
elif ThisHexDigit == 'B': BinaryEquivalent = '11' | [
-0.28962281346321106,
0.6718236207962036,
-0.38807815313339233,
-0.6559136509895325,
-0.29345592856407166,
0.8166211843490601,
0.5567006468772888,
-0.3090669810771942,
-0.17601191997528076,
-0.24105104804039001,
-0.6192818880081177,
0.17992544174194336,
-0.5877206921577454,
-0.494474261999... | |
elif ThisHexDigit == 'C': BinaryEquivalent = '12'
elif ThisHexDigit == 'D': BinaryEquivalent = '13'
elif ThisHexDigit == 'E': BinaryEquivalent = '14'
elif ThisHexDigit == 'F': BinaryEquivalent = '15'
Result = Result + BinaryEquivalent
elif ErrorFound == True: | [
-0.2156173586845398,
0.4483010172843933,
-0.4063316583633423,
-0.3269977867603302,
0.13035710155963898,
0.4453319311141968,
0.8450950384140015,
-0.4601351320743561,
-0.01512296311557293,
-0.08540474623441696,
-0.4068189263343811,
0.5116669535636902,
-0.2992909252643585,
-0.3789388239383697... | |
print('You have made a mistake')
elif Hex==EmptyInput:
print('Empty input, try again.')
return Result
```
Yes, I know this is an over-complicated piece of code but it is in the exam paper so I have to use it. It came like that, except that all the BinaryEquivalent strings were `BinaryEquivale... | [
0.17948032915592194,
0.20365481078624725,
-0.0002789967111311853,
-0.549877941608429,
0.024934647604823112,
0.331505686044693,
0.35913893580436707,
-0.1555166393518448,
-0.11542320251464844,
-0.48493003845214844,
0.015071284025907516,
0.6551600694656372,
-0.2515946328639984,
-0.15305221080... | |
statement out of the `for` cycle. | [
0.2721249759197235,
-0.010816886089742184,
-0.24134986102581024,
-0.07814193516969681,
-0.3663184344768524,
0.10923106968402863,
0.4623779356479645,
-0.09998215734958649,
-0.0428253673017025,
-0.2571026384830475,
-0.38342347741127014,
0.18363241851329803,
-0.48273277282714844,
0.1544813513... | |
For functions that don't change the state of an instance, the javadoc comment for the method is often the same or very similar as the one for the @return-tag in the Java-API.
**boolean Collection.isEmpty()**
* Returns true if this collection contains no elements.
* Returns: true if this collection contains no element... | [
0.22116133570671082,
-0.22863702476024628,
-0.026604900136590004,
-0.12445870041847229,
-0.02308725193142891,
-0.2002909928560257,
0.3548511564731598,
-0.3939373791217804,
-0.19120030105113983,
-0.6036900877952576,
-0.2574966549873352,
0.6597896814346313,
-0.6516687870025635,
-0.1798747032... | |
situations"*.
```
/**
* {@return the name of the object}
*/
public String getName();
```
Is equivalent to the (still supported) style:
```
/**
* Returns the name of the object.
*
* @return the name of the object
*/
public String getName();
```
Find more details at <https://bugs.openjdk.java.net/browse/JDK-8... | [
-0.4752281904220581,
0.10777527093887329,
0.009480958804488182,
-0.15900735557079315,
0.40564021468162537,
-0.056415945291519165,
0.43674471974372864,
0.23221923410892487,
-0.5686434507369995,
-0.6317023634910583,
-0.568748950958252,
0.7009046673774719,
-0.5251783728599548,
-0.132685244083... | |
I've created two MFC applications which compile and run ok from the IDE. However let's say that the second application wasn't created using App wizard, instead I copied the first application folder and then started to rename source files and relevant information such as string table, version etc. so that the second app... | [
0.48289230465888977,
-0.00475657731294632,
0.34771406650543213,
-0.07087007910013199,
-0.13325154781341553,
-0.18105743825435638,
0.11006825417280197,
-0.3066428005695343,
-0.31902453303337097,
-0.6783108115196228,
-0.10279478877782822,
0.6055331230163574,
-0.5396466851234436,
0.1441748291... | |
windows registry key).
I went to app.h, app.cpp, appdoc.h, appdoc.cpp, files and checked lines of code like:
SetAppID(\_T("SVGovCfg.AppID.NoVersion")); to make sure that there was no duplication between both apps, However it looks like still something is missing.
Any help is very welcome.
With `javadoc` 16 you may m... | [
0.01767602004110813,
0.14556552469730377,
0.6046011447906494,
-0.036045316606760025,
0.1718868464231491,
0.08296399563550949,
0.37932226061820984,
-0.2271302193403244,
-0.27504676580429077,
-0.9646008014678955,
-0.3568216860294342,
0.8082789182662964,
-0.4621725082397461,
-0.01251643151044... | |
<https://bugs.openjdk.java.net/browse/JDK-8075778> | [
-0.3382883667945862,
0.4415464699268341,
-0.3538423180580139,
0.005425720941275358,
0.44158822298049927,
-0.06367826461791992,
0.3089958429336548,
0.4448367953300476,
-0.8248156309127808,
-0.4731002449989319,
-0.3292403221130371,
0.2299024909734726,
-0.5258678197860718,
0.10794077068567276... | |
Need suggestion for migration few modules of asp.net mvc 3 application:
Right now we are using EF with POCO classes, but in the future for some performance driven modules we need to move to ADO.NET or some other ORM tool (may be DAPPER.NET).
The issue we are facing as of now is: our views dependent on Collection class... | [
0.14384552836418152,
-0.24421167373657227,
0.2759535312652588,
0.19433696568012238,
-0.19097425043582916,
-0.15685684978961945,
-0.04762694239616394,
-0.1622631996870041,
-0.40349480509757996,
-0.7152760624885559,
0.0046722316183149815,
0.5504050850868225,
-0.36324068903923035,
0.020597327... | |
minimum of change at data access layer, as i don't want my Views to get effect by that.
You should use the [Repository Design Pattern](http://msdn.microsoft.com/en-us/library/ff649690.aspx) to hide the implementation of your data access layer. The Repository will return the same POCO's and have the same operations cont... | [
0.42630478739738464,
-0.16609790921211243,
0.2863708734512329,
0.31547585129737854,
0.06422104686498642,
-0.19164614379405975,
0.006238839123398066,
-0.10757901519536972,
-0.45081374049186707,
-0.6812008619308472,
-0.05149472877383232,
0.7268580794334412,
-0.021488837897777557,
-0.09480652... | |
> **Possible Duplicate:**
>
> [Ping with iPhone SDK](https://stackoverflow.com/questions/1130963/ping-with-iphone-sdk)
I am creating a application. Where before sending request to server i need to long server. How can i do that?
You should check the reachability utility that Apple made:
[Reachability on developer.... | [
-0.14511404931545258,
0.025199510157108307,
0.6556917428970337,
-0.03411300480365753,
0.3898090124130249,
-0.11676182597875595,
0.4335051476955414,
0.0036467427853494883,
-0.4000857174396515,
-0.8130633234977722,
-0.0471525564789772,
0.3413688540458679,
-0.32962271571159363,
-0.03130067512... | |
adress/ip. | [
-0.10420127213001251,
0.010578367859125137,
0.23093046247959137,
0.05162060260772705,
-0.2572700083255768,
0.12608903646469116,
0.22693412005901337,
-0.16962149739265442,
-0.030476845800876617,
-0.6463260054588318,
-0.22373251616954803,
0.1468382328748703,
-0.32091954350471497,
0.437442332... | |
I have a MyPreferenceActivity that extends PreferenceActivity like this :
```
public class MyPreferenceActivity extends PreferenceActivity{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preferences);
}
}
... | [
0.11892746388912201,
-0.2471086084842682,
0.7340921759605408,
0.0761377215385437,
0.03134497255086899,
0.07560551166534424,
-0.14865508675575256,
-0.3225092887878418,
0.06575088202953339,
-0.8081703186035156,
-0.0014581402065232396,
0.2928021550178528,
-0.05814363807439804,
0.1460644900798... | |
android:key="PREFS_PRIMARY_NUMBER"
android:title="@string/primary_number_preference_title"
android:summary="@string/primary_number_preference_summary"
android:dialogTitle="@string/primary_number_preference_dialog_title"
android:dialogMessage="@string... | [
-0.2754376530647278,
0.014632031321525574,
0.48652493953704834,
-0.405651718378067,
0.11628582328557968,
0.6605515480041504,
0.052954815328121185,
-0.45927825570106506,
0.02697731740772724,
-0.8906272649765015,
-0.345056414604187,
0.6750163435935974,
-0.3447265326976776,
0.0936617329716682... | |
super(context);
this.ctx = context;
}
public PrimaryNumberPreference(Context context, AttributeSet attrs) {
super(context, attrs);
this.ctx = context;
}
public PrimaryNumberPreference(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
this.ctx = context;
}
@Ove... | [
0.21741144359111786,
-0.29562270641326904,
0.9833908081054688,
-0.10029798746109009,
0.2878165543079376,
0.2945615351200104,
0.2755199372768402,
-0.40539348125457764,
-0.07820597290992737,
-0.394792765378952,
-0.004282485693693161,
0.5967502593994141,
-0.4019729197025299,
0.262787878513336... | |
in their respective key and prepopulate the elements of the PreferenceActivity...
Eg: PrimaryNumber shared preference is set to 1234 when my app is installed. Now if I go to MyPreferenceActivity and browse the PrimaryNumber EditTextPreference, the text box should be prepopulated by 1234.
Something(pseudo code) like :... | [
0.15964432060718536,
-0.09164242446422577,
0.9606667160987854,
0.1735142022371292,
-0.15611878037452698,
0.07563139498233795,
-0.11616374552249908,
-0.2997196614742279,
0.11120232194662094,
-0.7060959935188293,
0.16433125734329224,
0.5679922103881836,
0.09952228516340256,
-0.06844160705804... | |
the help of suggestions provided by @Mel and Its very easy.
In the class that extends the corresponding PreferenceActivity element(e.g. shown below) just add this.setValue in the constructor of that preference element class. Thats it!
```
public class selectColorPreference extends ListPreference{
Context ctx = n... | [
0.04829290136694908,
-0.3443543314933777,
0.8239664435386658,
-0.2913106679916382,
0.1465161144733429,
0.14431898295879364,
0.3360922634601593,
-0.5007728934288025,
-0.013647444546222687,
-0.6172604560852051,
-0.25790935754776,
0.6789640784263611,
-0.32934924960136414,
0.14504481852054596,... | |
this.setValue(myPreferencesLibrary.getSharedPreferenceValueForColor());
}
}
``` | [
-0.025565361604094505,
-0.05528559535741806,
0.7671605944633484,
-0.12702861428260803,
0.3475354015827179,
-0.3526167869567871,
0.31802690029144287,
-0.23940344154834747,
-0.01847861148416996,
-0.751714289188385,
-0.10518942028284073,
0.6832026839256287,
-0.27660176157951355,
0.19762700796... | |
Tomcat is running a webapp under Windows. After a few days (under very low load), the exception mentioned in the title starts to appear in the logs, no new connections can be established from that point on, the only fix is then to reboot the server.
Environment:
* Latest Tomcat 6
* Windows Server 2008 R2
* JDK 6 upda... | [
-0.4054100513458252,
0.11983250826597214,
0.7072106003761292,
0.013439777307212353,
-0.012616311199963093,
-0.24925267696380615,
0.6046199202537537,
0.01768428646028042,
-0.5158930420875549,
-0.30884698033332825,
-0.26716822385787964,
0.6059173941612244,
-0.24393171072006226,
-0.1341841369... | |
* if we were leaking connections, shouldn't they show up in netstat?
* shouldn't a restart of the appserver resolve the problem, because the OS should free all process resources?
* is there a way to trace the problem to its origin? E.g. installing monitoring software, maybe something similar to lsof etc.?
I'm out of i... | [
0.17229965329170227,
0.2363283634185791,
0.24286402761936188,
0.1599460393190384,
0.1490451693534851,
-0.17864462733268738,
0.5920655727386475,
0.3117791414260864,
-0.3917957842350006,
-0.5917348265647888,
-0.10534500330686569,
0.5985289812088013,
-0.3262466490268707,
0.2770713269710541,
... | |
I have a JTree with a few nodes and subnodes. When I click on a node I want to know on which depth is it (0, 1, 3). How can I know that?
```
selected_node.getDepth();
```
doesn't return the depth of current node..
You should be using `getLevel`. [`getLevel`](http://docs.oracle.com/javase/1.4.2/docs/api/javax/swing... | [
0.025147613137960434,
-0.039931535720825195,
0.5046949982643127,
-0.10930449515581131,
0.028588680550456047,
-0.1531568020582199,
0.44478675723075867,
-0.3537062108516693,
-0.03781886771321297,
-0.6175665259361267,
-0.024556024000048637,
0.33282268047332764,
-0.12792600691318512,
0.0994276... | |
the depth of the tree rooted at this node. Which is not what you want. | [
-0.10206829756498337,
-0.33659207820892334,
-0.11535389721393585,
0.1962002068758011,
0.06448957324028015,
0.1813819855451584,
0.37312573194503784,
0.0713803842663765,
-0.12032433599233627,
-0.34865328669548035,
0.20999301970005035,
0.2225489765405655,
-0.14396438002586365,
0.1943165659904... | |
This is a noob question, but I wanna know why there are different encoding types and what are their differences (ie. ASCII, utf-8 and 16, base64, etc.)
Reasons are many I believe but the main point is: "How many characters you need to display (encode)?" If you live in US for example, you could go pretty far with ASCII.... | [
0.43657106161117554,
0.1243024617433548,
0.07528858631849289,
0.31467172503471375,
0.0620923675596714,
-0.00230396562255919,
0.17346295714378357,
0.36273375153541565,
-0.38244250416755676,
-0.6640574336051941,
-0.07686452567577362,
-0.09033014625310898,
-0.3462759852409363,
0.1470872163772... | |
also the China, Japan, Thailand and other "exotic" countires. Those weird figures on photos you may have seen around the world just might be letters, not pretty pictures.
As for the differences between different encoding types you need to see their specification. Here's something for UTF-8.
* <http://www.unicode.org/... | [
0.32332643866539,
0.0714232325553894,
0.13067616522312164,
0.14867821335792542,
-0.2665020823478699,
0.3445150554180145,
-0.13028205931186676,
0.4173520505428314,
-0.46516457200050354,
-0.5313071012496948,
-0.06121979281306267,
0.1714133769273758,
-0.22876594960689545,
-0.0849151536822319,... | |
encountered Base64.
* <http://en.wikipedia.org/wiki/Base64>
* <http://www.phpeveryday.com/articles/PHP-Email-Using-Embedded-Images-in-HTML-Email-P113.html>
Is short: To support computer program's user interface localizations to many different languages. (Programming languages still mainly consist of characters found ... | [
-0.4624367952346802,
0.22763021290302277,
0.3139924705028534,
-0.03922934830188751,
-0.23135019838809967,
0.21675342321395874,
0.260996550321579,
0.021337023004889488,
-0.11457714438438416,
-0.6726138591766357,
-0.17638489603996277,
0.18511271476745605,
-0.02084718644618988,
-0.06446483731... | |
below): "Because bytes have room for up to eight bits, lots of people got to thinking, "gosh, we can use the codes 128-255 for our own purposes." The trouble was, lots of people had this idea at the same time, and they had their own ideas of what should go where in the space from 128 to 255."
Thanks to Joachim and tch... | [
0.42319005727767944,
0.165877103805542,
0.05526447668671608,
0.29692313075065613,
-0.24694815278053284,
0.053266286849975586,
0.13625852763652802,
-0.05303829535841942,
-0.25937768816947937,
-0.6024821400642395,
-0.11520134657621384,
0.2206578403711319,
0.17022617161273956,
0.1560123115777... | |
years back. Good introduction to the subject I hope. Mark Davis goes a little deeper.
* <http://www.joelonsoftware.com/articles/Unicode.html>
* <http://www.icu-project.org/docs/papers/forms_of_unicode/> | [
-0.203084334731102,
-0.05913696810603142,
-0.12305380403995514,
-0.17990818619728088,
-0.1855650395154953,
0.2852698266506195,
-0.09195900708436966,
0.35851091146469116,
-0.2999197542667389,
-0.38867422938346863,
-0.29289186000823975,
-0.08904366195201874,
0.4527709484100342,
0.07769975066... | |
I've yet not found a very simple MVC framework. How do frameworks make it possible to access a controller by just an URL? I think it has got to do with the `QUERY_STRING` but isn't it suppose to have a `?`?
```
http://localhost/public/controllername
```
and `localhost/public` is located at:
```
C:\wamp\www\public\
... | [
0.08237530291080475,
-0.2395229935646057,
0.8022029995918274,
0.2777949273586273,
-0.10375800728797913,
-0.4576883018016815,
0.10540041327476501,
0.026773687452077866,
-0.28226810693740845,
-0.5817928910255432,
-0.07726018130779266,
0.2783869206905365,
-0.21204163134098053,
0.5621992945671... | |
some routes in your application.
**Quick example:**
`.htaccess` file:
```
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
```
`index.php` file:
```
$uri = $_SERVER['REQUE... | [
-0.136530801653862,
0.05717688798904419,
0.6249759793281555,
0.09688838571310043,
0.15275733172893524,
-0.06428979337215424,
0.2173168659210205,
-0.28775253891944885,
-0.06920092552900314,
-0.7178904414176941,
-0.19734184443950653,
0.2280995398759842,
-0.20649631321430206,
-0.2081840187311... | |
I'm making an application starting others installed applications on an Android smartphone.
Basically, here is the code i use to start another application made by myself, with a parameter.
Application 1 :
```
PackageManager pm = getApplicationContext().getPackageManager();
Intent appStartIntent = pm.getLaunchIntentFo... | [
0.4632098376750946,
-0.09670283645391464,
0.8534950613975525,
-0.2747420370578766,
0.3083224892616272,
0.15473178029060364,
0.45485103130340576,
-0.7082246541976929,
-0.13068819046020508,
-0.5472482442855835,
-0.5562098622322083,
0.5940389037132263,
-0.3395577371120453,
-0.1667217165231704... | |
try {
result= (String) extras.getString("message");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
recup = "nothing received";
}
Toast.makeText(getApplicationContext(), recup, Toast.LENGTH_SHORT).show();
}
```
The problem here, is that we n... | [
0.22831498086452484,
-0.19552522897720337,
0.38193559646606445,
-0.19150492548942566,
0.05863327160477638,
-0.15369324386119843,
0.6040287017822266,
-0.42050451040267944,
-0.08517847210168839,
-0.5860801935195923,
-0.41699591279029846,
0.5298414826393127,
-0.33203086256980896,
-0.063619434... | |
?
If yes, is it possible to know for example, the parameters accepted by any installed application on my phone? (example : Handcent, Facebook, latitude...)
Android doesn't define a metadata API that will allow you to retrieve the parameters an application is expecting. Thus, it isn't possible to do what you want. You w... | [
0.4962247908115387,
-0.05625200644135475,
0.4010300934314728,
0.378724068403244,
0.3645249903202057,
-0.05105217173695564,
0.13692572712898254,
-0.36376863718032837,
-0.16937988996505737,
-0.20408624410629272,
0.09162163734436035,
0.6746244430541992,
-0.10172230750322342,
-0.08441683650016... | |
am a total mySQL newbie, but I have no idea how to search for the answer to this, so that's why I'm bringing it here:
```
DESCRIBE rParam;
+----------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra | | [
-0.32751724123954773,
0.27411291003227234,
0.6015241146087646,
-0.11188392341136932,
-0.1320728063583374,
0.03343770280480385,
0.19851934909820557,
-0.3699347674846649,
-0.21526038646697998,
-0.4337809085845947,
-0.28425121307373047,
0.2908277213573456,
-0.25273069739341736,
0.189911141991... | |
+----------------+---------------+------+-----+---------+-------+
| p | float | YES | | NULL | |
| d | float | YES | [
-0.5538052320480347,
0.22304342687129974,
0.37177833914756775,
0.4249621033668518,
-0.12025903910398483,
0.31568780541419983,
-0.17594218254089355,
-0.5503038167953491,
0.2199864685535431,
-0.07473047077655792,
-0.3818185031414032,
0.07268434762954712,
-0.04830125719308853,
-0.060659840703... | |
| | NULL | |
| LTP | float | YES | | NULL | |
| LTD | float | [
-0.26974549889564514,
0.3057970702648163,
0.48542216420173645,
0.08133327960968018,
0.07508786022663116,
-0.26051610708236694,
0.03929024562239647,
-0.2360374927520752,
-0.07401441782712936,
0.1062663123011589,
-0.5178566575050354,
0.40981560945510864,
-0.321932852268219,
-0.03606541082262... | |
| YES | | NULL | |
| alpha | float | YES | | NULL | |
| N | [
-0.3115507960319519,
0.3272355794906616,
0.033276643604040146,
-0.05720812454819679,
0.023712702095508575,
-0.15025371313095093,
0.11019321531057358,
-0.4211472272872925,
0.16421672701835632,
0.023153729736804962,
-0.30377575755119324,
0.15410733222961426,
-0.5184094905853271,
0.1921934932... | |
| smallint(6) | YES | | NULL | |
| g | float | YES | | NULL | | | [
-0.25616300106048584,
0.09714271873235703,
0.23982442915439606,
-0.31234198808670044,
-0.07616246491670609,
-0.06660249829292297,
0.19458994269371033,
-0.44131147861480713,
-0.019389845430850983,
-0.09673938900232315,
-0.2541716396808624,
0.42939528822898865,
-0.46927207708358765,
0.210364... | |
| a | float | YES | | NULL | |
| seed | float | YES | | NULL | | | [
-0.4068242609500885,
0.3555903732776642,
-0.0920366495847702,
0.027172090485692024,
0.061946459114551544,
-0.05568113923072815,
-0.015910428017377853,
-0.16618196666240692,
0.36668217182159424,
0.02998070791363716,
-0.1836743950843811,
0.1612721085548401,
-0.3318312168121338,
0.22393409907... | |
| startingWeight | float | YES | | NULL | |
| path | varchar(1000) | YES | UNI | NULL | |
| type | [
-0.33303171396255493,
-0.0711052343249321,
0.18416084349155426,
0.060471199452877045,
-0.15542322397232056,
0.11843449622392654,
-0.07513189315795898,
-0.4807852804660797,
0.07122932374477386,
-0.3036063015460968,
-0.03843948617577553,
0.3931352496147156,
-0.33305394649505615,
0.1455423533... | |
| varchar(100) | YES | | NULL | |
+----------------+---------------+------+-----+---------+-------+
12 rows in set (0.00 sec)
SELECT p FROM rParam GROUP BY p;
+--------+ | [
-0.5421755313873291,
0.00013262894935905933,
0.6014544367790222,
-0.1498126983642578,
0.11780835688114166,
0.5159564018249512,
0.15206913650035858,
-0.7254142165184021,
-0.13814929127693176,
-0.36763444542884827,
-0.20880930125713348,
0.2664022445678711,
-0.19980734586715698,
-0.1109044253... | |
| p |
+--------+
| 0 |
| 0.001 |
| 0.002 |
| 0.003 |
| | [
-0.3476724624633789,
0.21440111100673676,
0.47167134284973145,
-0.14946022629737854,
-0.042066823691129684,
0.3724950850009918,
0.22979937493801117,
-0.5886903405189514,
0.3398228585720062,
-0.2731293737888336,
-0.44640645384788513,
0.11005552858114243,
-0.08326176553964615,
0.030628779903... | |
0.004 |
| 0.005 |
| 0.0075 |
| 0.008 |
| 0.01 |
| 0.012 |
| 0.0125 | | [
-0.3160693347454071,
0.5208913087844849,
0.28340181708335876,
-0.02519945241510868,
0.08949415385723114,
0.0025147392880171537,
0.36578765511512756,
-0.49529513716697693,
0.3837651312351227,
-0.11002445966005325,
-0.4802069067955017,
0.34798067808151245,
-0.05467720702290535,
0.44119057059... | |
| 0.014 |
| 0.015 |
| 0.02 |
| 0.025 |
| 0.03 |
| 0.035 |
| 0.04 | | [
-0.3979019522666931,
0.5626779794692993,
0.1930299699306488,
-0.043134186416864395,
-0.06842251867055893,
0.0703335627913475,
0.5235695838928223,
-0.4244697690010071,
0.4708138108253479,
0.028737569227814674,
-0.40196502208709717,
0.2871130704879761,
-0.08688415586948395,
0.432602316141128... | |
| 0.05 |
| 0.1 |
| 0.2 |
| 0.3 |
| 0.4 |
| 0.5 | [
-0.4184682071208954,
0.40741026401519775,
0.15829817950725555,
-0.10054247081279755,
0.09037552773952484,
-0.02208709344267845,
0.512035071849823,
-0.3992077708244324,
0.5417367815971375,
-0.10480965673923492,
-0.291230171918869,
0.29525914788246155,
-0.23540851473808289,
0.230251044034957... | |
|
| 0.6 |
| 0.7 |
+--------+
26 rows in set (0.00 sec)
```
I can get the results for one type of query:
```
SELECT p FROM rParam WHERE p=0.5 GROUP BY p; | [
-0.5891599655151367,
0.04553338885307312,
0.5391073822975159,
-0.32185739278793335,
-0.04010603576898575,
0.3860790729522705,
0.17056547105312347,
-0.839362621307373,
0.006816161330789328,
-0.4023296535015106,
-0.3578159213066101,
0.31063273549079895,
-0.39723271131515503,
-0.1274441629648... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.