text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
sequence `{1, 1, 1, 1, ... }` has
```
f(x) = 1 + x + x^2 + x^3 + ...
```
Conveniently, this function has a closed expression
```
f(x) = 1 / (1 - x)
```
and so we say that `1 / (1 - x)` is the generating function for `{1, 1, 1, 1, ... }`.
For your function `2x / (3x - 1 + sqrt(1 - 2x - 3x^2))` you need to expand... | [
-0.10927055031061172,
0.15827691555023193,
0.45347362756729126,
-0.4357418417930603,
-0.04308193549513817,
0.22618329524993896,
0.16959857940673828,
-0.3802686631679535,
0.08558110147714615,
-0.3707183599472046,
-0.3383016586303711,
0.2309676855802536,
-0.3554927706718445,
0.28569546341896... | |
2, 5, 13, 35, 96, 267, ...
```
and then if you use [OEIS](http://oeis.org/search?q=1%2C1%2C2%2C5%2C13%2C35%2C96%2C267&sort=&language=english&go=Search) you'll get
> A005773 Number of directed animals of size n (or directed n-ominoes in standard position).
which is right back to where you started showing that this g... | [
0.2711926996707916,
-0.2916647791862488,
-0.2603217363357544,
-0.024571511894464493,
-0.36929449439048767,
0.603800356388092,
0.014744014479219913,
-0.443023681640625,
-0.5257910490036011,
-0.344528466463089,
0.1711428463459015,
0.12860213220119476,
-0.5302609801292419,
0.2826318144798279,... | |
I'm looping through a List of elements with foreach, like this:
```
foreach (Type name in aList) {
name.doSomething();
}
```
However, in an another thread I am calling something like
```
aList.Remove(Element);
```
During runtime, this causes an InvalidOperationException: Collection was modified; enumeration op... | [
0.053259361535310745,
-0.07362549751996994,
0.23985855281352997,
-0.16820067167282104,
0.1157267615199089,
-0.21203944087028503,
0.5196319222450256,
-0.22596903145313263,
-0.14606912434101105,
-0.5407854318618774,
-0.0012597654713317752,
0.38298118114471436,
-0.639525830745697,
0.383307695... | |
I have a little problem with some preg\_replace functions in PHP.
First I have `$message = preg_replace("/\[img\](.*?)\[\/img\]/is", '<img src="$1" alt="" />', $message);` for replacing [img]http://example.com/img.png[/img] with an image. But after that I also have a preg\_replace which replaces URLs:
```
$message = p... | [
0.008582324720919132,
-0.009511932730674744,
0.7502959370613098,
-0.08473455160856247,
0.06748205423355103,
-0.20195549726486206,
0.42170655727386475,
-0.19187958538532257,
-0.055556509643793106,
-0.7065890431404114,
-0.08755872398614883,
0.67759108543396,
-0.48410606384277344,
0.489339679... | |
}
}
```
Thread B:
```
lock (aList) {
aList.Remove(Element);
}
```
This ofcourse is really bad for performance. | [
-0.08997145295143127,
0.005121914204210043,
0.11676254868507385,
-0.2939837574958801,
0.3279280364513397,
-0.4310820400714874,
0.4803502559661865,
0.17946472764015198,
0.14617633819580078,
-0.3774219751358032,
-0.044291384518146515,
0.3654730021953583,
-0.6373538970947266,
0.57849335670471... | |
I think this is a change precipitated by the move to automatic publishing in Tomcat?, but basically, it looks like when I have a project in eclipse that uses the war overlay, the resources are being copied from the local parent project, rather than that parent's war file. There's lots of building going on in the parent... | [
0.4584888219833374,
0.26765164732933044,
0.13921919465065002,
0.04176800325512886,
0.1064361110329628,
-0.16062691807746887,
-0.2874959111213684,
0.015535904094576836,
-0.22229233384132385,
-0.4836091101169586,
0.0030849119648337364,
0.6318747401237488,
-0.14815349876880646,
0.071341499686... | |
<groupId>org.parentproject</groupId>
<artifactId>parentproject-web</artifactId>
<version>2.0-SNAPSHOT</version>
<type>war</type>
</dependency>
```
this leads to the following the org.eclipse.wst.common.component
```
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1... | [
0.056935299187898636,
0.0940127745270729,
0.3787118196487427,
-0.026312638074159622,
0.2553999722003937,
0.343508243560791,
-0.20562292635440826,
-0.9049485325813293,
-0.1460055410861969,
-0.5570201873779297,
-0.13563181459903717,
0.41110867261886597,
-0.10432267189025879,
-0.1208546608686... | |
and your site - I noticed you are using Iframes. In the year of 2012, iframes are a thing of the past as a design feature, only to be used as 3rd party additions like offsite widgets and feeds (or sandboxing).
You need to structure your page like this for what you are going for:
```
<!doctype html>
<html>
<head>
... | [
0.5073931217193604,
0.054861634969711304,
0.5152752995491028,
0.04171053320169449,
-0.3226874768733978,
-0.3869136571884155,
-0.22364546358585358,
0.19111302495002747,
-0.47505372762680054,
-0.9019562005996704,
0.1402897983789444,
0.09017962217330933,
0.03095080330967903,
0.264298021793365... | |
-->
</body>
</html>
```
In the style.css have these rules:
```
body { margin: 28px 0 0; }
ul#menu {
position: absolute;
top: 0;
left: 0;
}
```
This should achieve what you are looking for using modern technique. | [
0.062039609998464584,
-0.07198537886142731,
0.6013325452804565,
-0.025906160473823547,
-0.25232934951782227,
-0.1740395575761795,
-0.14028939604759216,
-0.3126073181629181,
-0.17063017189502716,
-0.7330769896507263,
-0.06227773427963257,
0.43497219681739807,
0.1306048184633255,
-0.14007133... | |
I'm currently trying to use Active Admin Gem with an existing Rails 3.1 app already configured with devise. This app uses a after\_sign\_in\_path\_for method declared in application controller.
I followed the steps explained there <https://github.com/gregbell/active_admin>, the thing is that when I try to access 0.0.0... | [
0.2578197121620178,
0.35027047991752625,
0.4177662432193756,
-0.23861588537693024,
-0.0913422703742981,
0.27213025093078613,
0.8401453495025635,
-0.4511570632457733,
0.003589269006624818,
-0.9715827107429504,
0.15952371060848236,
0.6278229355812073,
-0.1479109525680542,
-0.0063324887305498... | |
match "currenthome" => "Application#currenthome", :as => "currenthome"
match "globalsearch" => "Application#globalsearch", :as => "globalsearch"
match "create_commentlike/:comment_id" => "Commentlikes#create", :as => "create_commentlike"
resources :commentlikes, :only => [:destroy]
match "create_postlike/:p... | [
-0.1455538123846054,
0.23449338972568512,
0.8544601798057556,
0.10438288003206253,
-0.03467048332095146,
-0.044152941554784775,
-0.21613022685050964,
-0.3420426547527313,
0.062402091920375824,
-0.6339108347892761,
0.141784206032753,
0.5636183023452759,
-0.4023955464363098,
0.18782575428485... | |
:as => "new_comment"
resources :friendships
get "friendships/:id/accept" => "Friendships#accept", :as => "accept_friendship"
get "friendships/:id/block" => "Friendships#block", :as => "block_friendship"
get "users/searching" => "Users#searching", :as => "searching_users"
resources :users, :only => [:index,... | [
-0.13694754242897034,
0.18168044090270996,
0.8250700831413269,
0.06091160327196121,
0.07132468372583389,
0.08804824948310852,
0.10120995342731476,
-0.4489987790584564,
-0.07064227759838104,
-0.7052093744277954,
-0.31888532638549805,
0.47595691680908203,
-0.09618225693702698,
0.014329604804... | |
priority is based upon order of creation:
# first created -> highest priority.
# Sample of regular route:
# match 'products/:id' => 'catalog#view'
# Keep in mind you can assign values other than :controller and :action
# Sample of named route:
# match 'products/:id/purchase' => 'catalog#purchase', :as... | [
-0.01839871145784855,
-0.5177574753761292,
0.1935916244983673,
0.28941646218299866,
0.15143859386444092,
0.3811279833316803,
-0.3429689407348633,
-0.2730441391468048,
-0.3166100084781647,
-0.5348756909370422,
-0.19778341054916382,
0.17926505208015442,
0.009259394370019436,
0.19536629319190... | |
:products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end
# Sample resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller | [
0.5975639224052429,
0.01016676239669323,
0.32127222418785095,
0.34854158759117126,
0.02695155330002308,
0.10001076757907867,
-0.17013590037822723,
-0.4742729365825653,
-0.1336321085691452,
-0.2929835319519043,
-0.38994649052619934,
0.2656721770763397,
0.2789340019226074,
0.2157383114099502... | |
# end
# Sample resource route with more complex sub-resources
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', :on => :collection
# end
# end
# Sample resource route within a namespace:
# namespace :admin do
# # Directs /admin/produ... | [
0.3228848874568939,
0.21158331632614136,
0.5199912190437317,
-0.047100458294153214,
0.3497866094112396,
0.18391185998916626,
-0.2265349179506302,
-0.3769071400165558,
0.14727738499641418,
-0.4676782786846161,
-0.2830793261528015,
0.07702549546957016,
-0.04644838720560074,
0.175727620720863... | |
resources :products
# end
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
# root :to => 'welcome#index'
# See how all your routes lay out with "rake routes"
# This is a legacy wild controller route that's not recommended for RESTful applications.
#... | [
0.20932592451572418,
-0.3411698341369629,
0.4950413405895233,
0.3431586027145386,
-0.1251162588596344,
-0.3618706464767456,
0.5902264714241028,
0.117640420794487,
-0.4260292649269104,
-0.8576158881187439,
-0.06967629492282867,
0.38260698318481445,
-0.10376924276351929,
0.193040668964386,
... | |
my rake routes
```
new_admin_user_session GET /admin/login(.:format) {:action=>"new", :controller=>"active_admin/devise/sessions"}
admin_user_session POST /admin/login(.:format) | [
0.1621616929769516,
-0.22513221204280853,
0.6402146220207214,
0.23330920934677124,
0.08522641658782959,
0.1128680408000946,
0.4658355116844177,
-0.3507055640220642,
0.2954550087451935,
-0.630649209022522,
0.3081018626689911,
0.45496106147766113,
0.2618083357810974,
0.0032014078460633755,
... | |
{:action=>"create", :controller=>"active_admin/devise/sessions"}
destroy_admin_user_session DELETE|GET /admin/logout(.:format) {:action=>"destroy", :controller=>"active_admin/devise/sessions"}
admin_user_password POST /admin/password(.:format) ... | [
-0.07680443674325943,
-0.04254085570573807,
0.3469742238521576,
0.17398624122142792,
0.06959303468465805,
0.033856648951768875,
0.29099932312965393,
-0.6585372686386108,
-0.13468345999717712,
-0.6670226454734802,
-0.5135247707366943,
0.6558895707130432,
-0.20800283551216125,
0.025840071961... | |
/admin/password/new(.:format) {:action=>"new", :controller=>"active_admin/devise/passwords"}
edit_admin_user_password GET /admin/password/edit(.:format) {:action=>"edit", :controller=>"active_admin/devise/passwords"} | [
-0.14589345455169678,
-0.13693852722644806,
0.4291328489780426,
0.13616561889648438,
0.0051726968958973885,
0.09042001515626907,
0.07247686386108398,
-0.5664834976196289,
-0.23075245320796967,
-0.7016180753707886,
-0.5048030018806458,
0.7034503221511841,
-0.3546820282936096,
0.000359282887... | |
PUT /admin/password(.:format) {:action=>"update", :controller=>"active_admin/devise/passwords"}
admin_dashboard /admin(.:format) | [
0.3336679935455322,
-0.23473700881004333,
0.06857416033744812,
0.16349159181118011,
0.306848406791687,
0.12406620383262634,
0.05084013193845749,
-0.1760781705379486,
0.17538252472877502,
-0.8232851028442383,
-0.4631606340408325,
0.7564532160758972,
-0.24479429423809052,
-0.3202441036701202... | |
{:action=>"index", :controller=>"admin/dashboard"}
admin_admin_users GET /admin/admin_users(.:format) {:action=>"index", :controller=>"admin/admin_users"}
POST /admin/admin_users(.:format) | [
-0.11680593341588974,
-0.1394270360469818,
0.498611718416214,
0.33574116230010986,
0.06628752499818802,
0.3774684965610504,
0.02765960432589054,
-0.21907009184360504,
-0.17536744475364685,
-0.5477540493011475,
-0.35283634066581726,
0.5518032312393188,
-0.2896260619163513,
-0.29064568877220... | |
{:action=>"create", :controller=>"admin/admin_users"}
new_admin_admin_user GET /admin/admin_users/new(.:format) {:action=>"new", :controller=>"admin/admin_users"}
edit_admin_admin_user GET /admin/admin_users/:id/edit(.:format) | [
-0.07191057503223419,
-0.19197295606136322,
0.4931662380695343,
0.18662770092487335,
-0.01512475311756134,
0.2938234508037567,
-0.05645596608519554,
-0.6194626688957214,
-0.3181346654891968,
-0.6321970224380493,
-0.38323742151260376,
0.48480573296546936,
-0.2070712447166443,
-0.02378430403... | |
{:action=>"edit", :controller=>"admin/admin_users"}
admin_admin_user GET /admin/admin_users/:id(.:format) {:action=>"show", :controller=>"admin/admin_users"}
PUT /admin/admin_users/:id(.:format) | [
0.14575736224651337,
-0.2170780450105667,
0.42943671345710754,
0.06769952178001404,
-0.28720852732658386,
0.22422920167446136,
0.058761171996593475,
-0.41090330481529236,
-0.17509518563747406,
-0.41952574253082275,
-0.5027559399604797,
0.45637136697769165,
-0.3052145540714264,
-0.152773708... | |
{:action=>"update", :controller=>"admin/admin_users"}
DELETE /admin/admin_users/:id(.:format) {:action=>"destroy", :controller=>"admin/admin_users"}
```
Copying the answer from the comments in order to remove this question from the "Unanswered" filter:
> Actuall... | [
0.0935935378074646,
0.028458893299102783,
0.3600972294807434,
0.01624934934079647,
-0.17237214744091034,
0.13704924285411835,
0.2226286679506302,
-0.622845470905304,
-0.0799870640039444,
-0.4416195750236511,
-0.07449328899383545,
0.5046933889389038,
-0.48278817534446716,
0.0896321088075637... | |
to modify it in case we're logging in to admin panel. For that I just added a test and used the keyword "super" to keep the super after\_sign\_in\_path method clean when loggin to admin\_panel. This was suggested in this comment: <https://github.com/gregbell/active_admin/issues/1133#issuecomment-4967768>
~ answer per ... | [
0.2390410602092743,
0.14811260998249054,
0.3683774173259735,
0.1614348143339157,
-0.1255597472190857,
-0.09476449340581894,
0.5619966387748718,
-0.18802247941493988,
-0.5278118252754211,
-0.35079261660575867,
-0.3009221851825714,
0.46512123942375183,
-0.4366997480392456,
-0.196204826235771... | |
I am new to jqGrid, and having trouble with achieving a couple of tasks. Any guidance will be a huge help.
Issue1# I need to perform following jquery masking on my rate field in the create form,
$('#Rate').priceFormat({ prefix: '', thousandsSeparator: '' }); How could I achieve this in jqGrid?
Thanks a lot.
This is... | [
0.17838072776794434,
-0.10044518113136292,
0.7024139761924744,
0.0016112577868625522,
-0.09910581260919571,
-0.04672117158770561,
0.06312557309865952,
-0.11767834424972534,
0.1266160011291504,
-0.8034141063690186,
0.1716001331806183,
0.7925386428833008,
-0.09289194643497467,
0.088568836450... | |
RATEColumn.EditDialogLabel = "Rate";
RATEColumn.DataType = typeof(float);
RATEColumn.EditClientSideValidators.Add(new RequiredValidator());
RATEColumn.EditClientSideValidators.Add(new NumberValidator());
RATEColumn.Formatter = new CurrencyFormatter
{
... | [
-0.04004967585206032,
-0.1383485496044159,
0.6739122867584229,
0.11622587591409683,
0.2738679349422455,
0.24861153960227966,
-0.4310134947299957,
-0.32730957865715027,
-0.39855363965034485,
-0.3773253858089447,
-0.009685514494776726,
0.10992935299873352,
-0.13277912139892578,
0.18208090960... | |
DecimalSeparator = ".",
Prefix = "$",
Suffix = " USD",
ThousandsSeparator = ","
};
```
It's important to understand, that jqGrid try to separate the data from the visualization. So If you need to display currency for example you should fill | [
-0.19537964463233948,
0.20760703086853027,
0.29473876953125,
0.2459777593612671,
-0.021957553923130035,
0.3555222749710083,
-0.47326958179473877,
0.12098443508148193,
-0.3646761178970337,
0.05507814884185791,
0.20767931640148163,
0.17731019854545593,
0.10520157963037491,
-0.064939849078655... | |
*numbers* in the input data and use [predefined](http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3apredefined_formatter#predefined_format_types) of [custom](http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3acustom_formatter) *formatters* to display the currency in format which corresponds the locale which you nee... | [
0.23163333535194397,
0.07164501398801804,
0.4188527762889862,
-0.06186233460903168,
-0.17340342700481415,
0.44087207317352295,
-0.0069093587808310986,
-0.2428862750530243,
-0.5105061531066895,
-0.5130203366279602,
-0.052713703364133835,
0.25844043493270874,
-0.0889720469713211,
0.224582165... | |
Why would one use the `AlertDialog.Builder` class rather than the methods directly available to `AlertDialog`,
For example, why use `AlertDialog.Builder.setCancellable` rather than `AlertDialog.setCancellable`? Surely this is a case of redundancy?
Because `AlertDialog.setCancellable` returns void and `AlertDialog.Buil... | [
0.43659207224845886,
-0.26199576258659363,
0.1644423007965088,
0.1372360736131668,
-0.194636732339859,
-0.39538323879241943,
0.4116891920566559,
-0.08949598670005798,
-0.04858151823282242,
-0.48432645201683044,
-0.3175888657569885,
0.6896660923957825,
-0.6082422137260437,
0.050782945007085... | |
I am working on a project where I am sending numbers via serial port to an RF transmitter. On the other side, the receiver is attached to an Arduino. The Visual Basic program is sending numbers and the Arduino program is meant to receive these numbers and use them to control a motor. (We need a PWM signal for the motor... | [
0.6378228068351746,
0.002836070489138365,
0.41587191820144653,
0.3119538128376007,
-0.09247836470603943,
0.047953274101018906,
-0.2672841548919678,
-0.08795875310897827,
-0.1394301801919937,
-0.3777673840522766,
0.27079904079437256,
0.822048008441925,
-0.3409454822540283,
0.150405392050743... | |
garbage. These are the transmitter and receiver I am using:
<http://www.alldatasheet.com/datasheet-pdf/pdf/344352/KYL/KYL-210.html>
Do I have a problem with the type of values the transmitter and receiver are sending? Or would it be a problem from the Arduino program?
Here is the program:
```
int i = 0;
int MLmos... | [
0.40656861662864685,
0.24169088900089264,
0.34221458435058594,
0.07344948500394821,
-0.14750617742538452,
0.03740914911031723,
0.41198083758354187,
-0.450691819190979,
-0.2025567591190338,
-0.2559552788734436,
0.022309929132461548,
0.5697166323661804,
-0.42187899351119995,
0.37047368288040... | |
rate at 9600 bps
}
void loop()
{
byte record[2] = {0};
byte state = 0;
byte currentState = 0;
if (Serial.available()) // check if data has been sent from the computer
{
state = Serial.read(); // reads the most recent byte (from 0 - 255)
if(i % 2 == 0) // THIS PART CHECKS WERE TO FILL IN ARRAY SO AS TO ... | [
0.2720237374305725,
-0.20796313881874084,
0.7543277740478516,
-0.24374844133853912,
0.12068293988704681,
0.39836248755455017,
0.20705749094486237,
-0.4857046902179718,
-0.3904789686203003,
-0.26752763986587524,
-0.05943826213479042,
0.47544267773628235,
0.04857267811894417,
0.2103825062513... | |
0); // 0V
analogWrite(MRmosfet1_4, currentState); //steady 5V
analogWrite(MRmosfet2_3, 0); // 0V
}
else if (state>=64 && state<=127) //reverse
{
currentState = (state-64)*4; //0 - 252
analogWrite(MLmosfet1_4, 0); // 0V
analogWrite(MLmosfet2_3, currentState); // steady 5V
analogWrite(MRmosfet1_4, 0); //... | [
-0.38588690757751465,
-0.2026246339082718,
0.8432563543319702,
-0.4095049798488617,
0.26283735036849976,
0.7691185474395752,
-0.06361472606658936,
-0.6459153294563293,
-0.4401942789554596,
-0.2841466963291168,
-0.09727247059345245,
0.7292505502700806,
-0.048256076872348785,
-0.138059139251... | |
duty cycle
analogWrite(MLmosfet2_3, 0); // 0V
analogWrite(MRmosfet1_4, record[1]); //keeps previous forward speed
analogWrite(MRmosfet2_3, 0); // 0V
}
else //means that previous action was reverse
{
analogWrite(MLmosfet1_4, 0); // 0V
analogWrite(MLmosfet2_3, currentState); ... | [
-0.3074924051761627,
-0.2528967559337616,
0.5895395278930664,
-0.24474139511585236,
0.02621961012482643,
0.6088783740997314,
0.035067394375801086,
-0.6651520729064941,
-0.43547937273979187,
-0.23566709458827972,
0.19888761639595032,
0.7925659418106079,
0.07334425300359726,
0.18145965039730... | |
else // i is odd, therefore we have to read from reord[0]
{
if (record[0] >=0 && record[0] <=63) //previous action was move forward
{
analogWrite(MLmosfet1_4, currentState); //approx 25% duty cycle
analogWrite(MLmosfet2_3, 0); // 0V
analogWrite(MRmosfet1_4, record[0]); //keeps previous ... | [
-0.1240321695804596,
-0.1465521603822708,
0.7306829690933228,
-0.32643356919288635,
0.15375560522079468,
0.6865854263305664,
0.03785917907953262,
-0.6687102913856506,
-0.3220902383327484,
-0.20355626940727234,
0.2853541672229767,
0.6890968680381775,
0.08972471952438354,
0.11899779736995697... | |
analogWrite(MLmosfet1_4, 0); // 0V
analogWrite(MLmosfet2_3, currentState); // approx 25% duty cycle
analogWrite(MRmosfet1_4, 0); // 0V
analogWrite(MRmosfet2_3, record[0]); // keeps previous reverse speed
}
}
}
else if(state>=192 && state <=255) //right
{
currentState = (state - 118); //in... | [
-0.24716919660568237,
-0.15927629172801971,
0.814734697341919,
-0.13307982683181763,
0.10932670533657074,
0.7368918061256409,
0.015786096453666687,
-0.5463614463806152,
-0.5041398406028748,
-0.3373001217842102,
0.23204262554645538,
0.8093885183334351,
0.1397077888250351,
-0.164727553725242... | |
analogWrite(MLmosfet2_3, 0); // 0V
analogWrite(MRmosfet1_4, currentState); //approx 25% duty cycle
analogWrite(MRmosfet2_3, 0); // 0V
}
else //means that previous action was reverse
{
analogWrite(MLmosfet1_4, 0); // 0V
analogWrite(MLmosfet2_3, record[1]); // keeps previous rever... | [
-0.3044932782649994,
-0.20213043689727783,
0.5435642004013062,
-0.12294235080480576,
0.24568751454353333,
0.7593601942062378,
-0.037589024752378464,
-0.4584554433822632,
-0.4968753755092621,
-0.3172399699687958,
0.17469316720962524,
0.9547375440597534,
-0.062652587890625,
0.030687261372804... | |
else // i is odd, therefore we have to read from reord[0]
{
if (record[0] >=0 && record[0] <=63) //previous action was move forward
{
analogWrite(MLmosfet1_4, record[0]); //keeps previous forward speed
analogWrite(MLmosfet2_3, 0); // 0V
analogWrite(MRmosfet1_4, currentState); //approx 2... | [
-0.1674477756023407,
-0.17597445845603943,
0.7305291295051575,
-0.23168212175369263,
0.1974029690027237,
0.6569254398345947,
0.01342625543475151,
-0.7181820273399353,
-0.41255441308021545,
-0.20294415950775146,
0.320048451423645,
0.6758208870887756,
0.16249437630176544,
0.1615167260169983,... | |
analogWrite(MLmosfet1_4, 0); // 0V
analogWrite(MLmosfet2_3, record[0]); // keeps previous reverse speed
analogWrite(MRmosfet1_4, 0); // 0V
analogWrite(MRmosfet2_3, currentState); // approx 25% duty cycle
}
}
}
i++;
}
}
```
Looking at the code for `HttpSessionState` shows us that they are ... | [
-0.07378837466239929,
-0.3370565176010132,
0.5889667868614197,
0.05826529487967491,
0.2107267826795578,
0.4544633626937866,
0.06706290692090988,
-0.3206872344017029,
-0.2939743101596832,
-0.33010903000831604,
0.3054508566856384,
0.9125784039497375,
-0.12248539179563522,
-0.0398844666779041... | |
}
public object this[string name]
{
get
{
return this._container[name];
}
set
{
this._container[name] = value;
}
}
...
}
```
As for them both
> Storing data in | [
-0.26667678356170654,
-0.007570565678179264,
0.20031267404556274,
0.07360290735960007,
0.27281877398490906,
-0.14183570444583893,
-0.007069176062941551,
-0.11393467336893082,
-0.1283189356327057,
-0.5067296028137207,
-0.2642105221748352,
0.4423190653324127,
-0.32413676381111145,
0.33624511... | |
`key = "Value"` format like `Dictionary` class in C#.
They actually store the result in an `IHttpSessionState` object. | [
-0.13450798392295837,
-0.07762827724218369,
0.2727351784706116,
0.1788904368877411,
-0.011117605492472649,
-0.25331974029541016,
0.14459863305091858,
-0.056212011724710464,
0.09220583736896515,
-0.2650635540485382,
-0.386392205953598,
0.523400068283081,
-0.16524532437324524,
0.084289290010... | |
I am reading "Practical API design" and find following paragraph:
"*The other reason to prefer methods over fields can be found in the JVM specification. You’re permitted to move a method from a class to one of its superclasses and still maintain binary compatibility. So, a method initially introduced as Dimension jav... | [
0.25095099210739136,
-0.15118727087974548,
0.18508920073509216,
-0.1667940765619278,
-0.17518620193004608,
-0.16477276384830475,
0.1552189439535141,
-0.3001140058040619,
-0.3100191354751587,
-0.4531865417957306,
-0.018665717914700508,
0.43584558367729187,
-0.4408322870731354,
-0.0800310075... | |
this isn’t allowed for fields. Once a field is defined in a class, it has to stay there forever to maintain binary compatibility, which is another reason to keep fields private***"
since I agree using getter/setter is better way. But I don't understand why moving public field to parent class will break binary compatib... | [
0.0902213603258133,
-0.1571124643087387,
-0.23468071222305298,
0.1187472864985466,
-0.03515688702464104,
-0.5503446459770203,
0.27549025416374207,
0.15836185216903687,
-0.28164488077163696,
-0.4829142689704895,
-0.13574308156967163,
0.24450652301311493,
-0.23100776970386505,
0.425318121910... | |
SE 7 Edition, [defines](http://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.1) the binary name of an unqualified field access expression as follows:
> Given a legal expression denoting a field access in a class C, referencing a non-constant (§13.4.9) field named f declared in a (possibly distinct) clas... | [
0.12924595177173615,
0.023813480511307716,
0.4944128096103668,
-0.10167936235666275,
0.02284669131040573,
-0.12139401584863663,
-0.0019748713821172714,
-0.32867446541786194,
0.27684298157691956,
-0.2562417984008789,
-0.6212334036827087,
0.6547038555145264,
-0.22627049684524536,
0.006750157... | |
the qualifying type of the reference.
(The Language Specification for Java 1.5 [uses](http://docs.oracle.com/javase/specs/jls/se5.0/html/binaryComp.html#13.1) the exact same wording)
That is, the binary name of a field access expression does not refer to the type that declares the field, only to the type of the prima... | [
0.31171831488609314,
0.0677172988653183,
0.20323307812213898,
-0.10277858376502991,
-0.03557407855987549,
-0.006769323255866766,
0.27078408002853394,
-0.4484120309352875,
0.0909782350063324,
-0.2570408880710602,
-0.286603718996048,
0.4572870433330536,
-0.43678465485572815,
0.21618379652500... | |
public String toString() {
return message;
}
}
```
to
```
package p;
public class Super {
public String message;
}
package p;
public class Sub extends Super {
@Override
public String toString() {
return message;
}
}
```
without recompiling
```
package p;
public class Main {... | [
-0.2258920669555664,
-0.4944142997264862,
0.5959679484367371,
-0.3428952991962433,
-0.052074480801820755,
-0.04005090892314911,
0.5151347517967224,
-0.3030847907066345,
-0.19752037525177002,
-0.3561949133872986,
-0.887628436088562,
0.5156829357147217,
-0.6025562882423401,
0.324818193912506... | |
System.out.println(sub);
System.out.println(sub.message);
}
}
```
I still received the output of
```
hello
hello
```
, not a `LinkageError`.
To conclude, that claim is not true for Java 7. It may have been true for JDK 1.4 or earlier, which was declared end-of-life more than 5 years ago. Either way, p... | [
-0.06401990354061127,
0.16157513856887817,
0.3718063533306122,
-0.2974497079849243,
-0.08752100169658661,
-0.3038395047187805,
0.5985790491104126,
0.14430278539657593,
-0.35777410864830017,
-0.4042187035083771,
-0.1820012778043747,
0.6171491742134094,
-0.35142409801483154,
0.37501600384712... | |
I'm looking to send an encrypted variable from a website on a HTTP page to another website on a HTTPS page, the code I'm using to accomplish this is:
```
$VARIABLE = 'myvariable';
function do_post_request($url, $data, $optional_headers = null)
{
$params = array('http' => array(
'method' => 'POST',
... | [
0.1720966398715973,
-0.048400264233350754,
0.40494611859321594,
-0.017606670036911964,
-0.04251061752438545,
0.22153091430664062,
0.40307196974754333,
-0.2624801993370056,
-0.05514036864042282,
-0.40539056062698364,
-0.22114385664463043,
0.22246380150318146,
-0.48839014768600464,
0.2145481... | |
$ctx = stream_context_create($params);
$fp = @fopen($url, 'rb', false, $ctx);
if (!$fp) {
throw new Exception("Problem with $url, $php_errormsg");
}
$response = @stream_get_contents($fp);
if ($response === false) {
throw new Exception("Problem reading data from $url, $php_errormsg");
}
return $res... | [
0.2890097498893738,
-0.13940271735191345,
0.5907755494117737,
0.2080719769001007,
-0.24415019154548645,
-0.12203362584114075,
0.52183598279953,
-0.12043110281229019,
-0.10431499034166336,
-0.7131657600402832,
-0.29618823528289795,
0.6688608527183533,
-0.37750154733657837,
0.111574366688728... | |
thanks for all the quick replies guys! Like many of you suggested I've just taken a quick look at cURL and found this lying around in Google:
```
$url = 'https://localhost/myphpfile.php';
// Initialize session and set URL.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
// Set so curl_exec returns the result... | [
0.3193785548210144,
0.2507641911506653,
0.8567439317703247,
0.347911536693573,
-0.371553897857666,
-0.46396952867507935,
0.5933709740638733,
0.06079838424921036,
-0.04667326807975769,
-0.4605199098587036,
-0.4085499942302704,
0.4948921501636505,
-0.2342487871646881,
-0.10089996457099915,
... | |
can get the data being sent to 'myphpfile'?
Building on your cURL code, you'd really just need to add the following lines before your `curl_exec()` call:
```
// number of POST variables you're passing - your number will likely be different
curl_setopt($ch,CURLOPT_POST,3);
// the post variables themselves - make sure t... | [
0.2403031438589096,
0.0037636745255440474,
0.7111841440200806,
-0.10278503596782684,
0.07939274609088898,
-0.07516644150018692,
0.14794856309890747,
-0.045016683638095856,
-0.16392233967781067,
-0.589472234249115,
-0.17004446685314178,
0.4250451922416687,
-0.3839704096317291,
-0.0347047559... | |
I have a facebook application where the user choose 4 of his friends and then it creates a video (swf) with the pictures of your friends in it (loaded via xml). So I need to share this video on the user timeline. Everything works fine but the video is not embedded in the post on his timeline, there is only a post with ... | [
0.7816662192344666,
0.27024343609809875,
0.3711530268192291,
0.06375501304864883,
-0.16579188406467438,
-0.14187566936016083,
0.1297079622745514,
0.18758703768253326,
-0.3432309925556183,
-0.48865804076194763,
0.25862663984298706,
0.20277158915996552,
-0.04610471799969673,
0.16749516129493... | |
called by the share button in js :
```
function postToFeed() {
var obj = {
method: 'feed',
link: 'https://mysite.com/flash/share-page.php?id=22',
picture: 'https://mysite.com/images/video-preview.jpg',
name: 'Name',
caption: 'Caption',
description: 'Description'
};
fun... | [
0.37689054012298584,
-0.023415381088852882,
0.6210678219795227,
-0.21400491893291473,
-0.16487106680870056,
0.09136023372411728,
0.21055009961128235,
-0.3266012966632843,
-0.022492239251732826,
-0.30196234583854675,
-0.5915470123291016,
0.528109610080719,
-0.3360835611820221,
0.29294267296... | |
html>
<html>
<head>
<title>Title</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="content-language" content="en">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta property="og:video" content="<?php echo $video_url; ?>"/>
<!-- Open grah tags for Fa... | [
0.12478873878717422,
0.2201208621263504,
0.5521864891052246,
-0.04058966785669327,
-0.4768446683883667,
0.006052811164408922,
0.2891466021537781,
-1.0464510917663574,
-0.17980092763900757,
-0.2547663450241089,
-0.06883806735277176,
0.6288753747940063,
-0.17292660474777222,
-0.1468037068843... | |
xmlUrl:"xml/data-<?php echo $id_inscription; ?>.xml",
policyFileUrl:"http://profile.ak.fbcdn.net/crossdomain.xml"
};
var params = {
menu: "false",
scale: "noScale",
allowFullscreen: "true",
allowScriptAccess: "always",
bgcolor: "",
wmode: "opaque"
... | [
-0.0934237390756607,
-0.23310846090316772,
0.6233551502227783,
-0.011882851831614971,
-0.0687958151102066,
0.03164685517549515,
0.13501225411891937,
-0.37446555495262146,
-0.11021535098552704,
-0.6352063417434692,
-0.5685054063796997,
0.4822556674480438,
-0.39837485551834106,
0.00470737786... | |
webcam
};
var attributes = {
id:"content"
};
swfobject.embedSWF(
"app.swf",
"altContent", "480", "270", "10.0.0",
"expressInstall.swf",
flashvars, params, attributes);
</script>
</head>
<body>
<div id="altContent">
<p><a href="http://www.adobe.com/go/getflash... | [
0.3108311593532562,
-0.0515451617538929,
0.6112253069877625,
-0.11534088104963303,
-0.07847455888986588,
-0.09577282518148422,
0.1470043659210205,
-0.34131425619125366,
-0.10610303282737732,
-0.6013129949569702,
-0.32236236333847046,
0.47204139828681946,
-0.4642576277256012,
-0.22364817559... | |
latStr = latitude + "";
String longStr = longitude + "";
String url = preamble + latStr + "," + longStr + postamble + key;
``` | [
-0.016270797699689865,
0.18424609303474426,
0.9008863568305969,
-0.05305902659893036,
0.21467840671539307,
-0.10378597676753998,
0.10405591130256653,
0.08346523344516754,
0.07314892113208771,
-0.1533428430557251,
-0.7145156264305115,
-0.07393490523099899,
-0.06523844599723816,
0.7479100823... | |
I have a chart with 2 bar plots (Example: A and B).
For each hour i have 2 bar plots.
When i set the legend, i get swatch and text for every hour and bar
plot.
Example: In my chart have 4 hours then my legend will be like this
A A A A
B B B B
And i only want
A B
Because on every hour, the bars means th... | [
0.4705667495727539,
0.23512214422225952,
0.755836009979248,
-0.28765037655830383,
-0.2862403690814972,
-0.10995718836784363,
0.7752613425254822,
-0.5241586565971375,
-0.5396480560302734,
-0.5065974593162537,
0.21391190588474274,
0.13471239805221558,
-0.15715475380420685,
0.6376046538352966... | |
legendWithGraph:barChart];
CPTLegend *theLegend = [CPTLegend legendWithPlots:[NSArray arrayWithObjects:[barChart plotAtIndex:0],[barChart plotAtIndex:1], nil]];
theLegend.numberOfRows = 1;
theLegend.numberOfColumns = 2;//[horas count] +1 / 2;
//theLegend.fill = [CPTFill fillWithColor:[CPTColor colorWithGenericGray:... | [
-0.14307056367397308,
0.13129065930843353,
0.947523295879364,
0.0656832829117775,
0.08632078766822815,
0.15334421396255493,
0.31010323762893677,
-0.7536191940307617,
-0.4540698230266571,
-0.4301896095275879,
-0.3920207917690277,
0.32114192843437195,
0.03296816721558571,
0.2044885903596878,... | |
isEqual:@"Embarque"] ) {
if (index == 0)
{
return @"Embarque";
}else {
return @"";
}
}else {
if (index == 0)
{
return @"Desembarque";
}else {
return @"";
}
}
```
}
-(BOOL)legend:(CPTLegend \*)legend shouldDrawSwatchAtIndex:(NSUInteger)index forPlot... | [
-0.11144056916236877,
-0.45238444209098816,
0.8651440143585205,
0.1089617908000946,
0.17955173552036285,
-0.07924879342317581,
0.29629701375961304,
-0.5168067812919617,
-0.5261614322662354,
-0.6364278197288513,
-0.11360075324773788,
0.6837278604507446,
0.001756413490511477,
0.2333954721689... | |
YES;
}else{
return NO;
}
```
}
Don't implement the `-legendTitleForBarPlot:recordIndex:` method unless you want a separate label for each bar. Use the `title` property to set a single legend title for the plot.
The `-legend:shouldDrawSwatchAtIndex:forPlot:inRect:inContext:` method is only needed if you want ... | [
0.28644415736198425,
-0.18514446914196014,
0.59330815076828,
0.17238375544548035,
0.3428235650062561,
-0.33553457260131836,
0.20166610181331635,
-0.19536209106445312,
-0.010270652361214161,
-0.3434481620788574,
-0.28940340876579285,
0.4486176371574402,
-0.16297568380832672,
0.2524715363979... | |
I have a spaceship, that spaceship moves though space 360 Degrees.
The spaceship needs thrust animation in 2d. The trust animation needs to be at the bottom middle line of the spaceship. I have the following variables.
```
_Rotation
_Spaceship.width
_Spaceship.height
_Spaceship.Position(x,y)
```
I've uploaded an i... | [
-0.16116322576999664,
0.21042414009571075,
0.6932951807975769,
0.260833740234375,
-0.10572442412376404,
0.42702749371528625,
0.21787801384925842,
-0.29627224802970886,
-0.1056402251124382,
-0.9891104698181152,
-0.14362691342830658,
0.7432122826576233,
0.12008895725011826,
0.118822887539863... | |
(_SpaceshipAnimation.getWidth() / 2) - (_thrustAnimation.getWidth() / 2);
int SpaceshipCenterY = getPosition().y + ((_SpaceshipAnimation.getHeight() / 2) - (_thrustAnimation.getHeight() / 2));
double OffSetCos = Math.cos(_spaceshipDegrees);
double OffSetSin = Math.sin(_spaceshipDegrees);
_thurstPositi... | [
0.14986543357372284,
-0.04431590065360069,
0.8188115954399109,
0.03193049877882004,
-0.043287716805934906,
0.18463817238807678,
-0.01901274174451828,
-0.1913381814956665,
-0.32863494753837585,
-0.5635893940925598,
-0.23441673815250397,
0.5192024111747742,
0.21377652883529663,
0.08762253075... | |
flashing everywhere.
--- UPDATE 2 ---
This is almost working but it's going too far out:
```
int xOffset = -1 * (_itemAnimation.getWidth() / 2);
double DegreeToRadien = Math.toRadians(_degrees);
_thurstPosition.set
(
(int)(((xOffset) * Math.cos(DegreeToRadien)) + getPosition().x),
(i... | [
-0.14907631278038025,
0.06877467036247253,
0.7997449040412903,
-0.26774412393569946,
-0.5106661319732666,
0.39401692152023315,
0.4779887795448303,
0.04545249417424202,
-0.35662156343460083,
-0.4885789752006531,
-0.17257478833198547,
0.6876678466796875,
-0.2685493230819702,
-0.2240449041128... | |
_thrustAnimation.getHeight() / 2);
int xOffset = -1 * (_itemAnimation.getWidth() / 2);
_thurstPosition.set
(
(int)(((xOffset) * Math.cos(DegreeToRadien)) + ObjectXCenter),
(int)(((xOffset) * Math.sin(DegreeToRadien)) + ObjectYCenter)
);
``` | [
-0.1617695689201355,
-0.1237785592675209,
0.7679796814918518,
-0.0688474252820015,
-0.46140822768211365,
0.43045327067375183,
0.29237720370292664,
-0.5251947641372681,
0.05284678563475609,
-0.36865997314453125,
-0.2869018316268921,
0.5701879858970642,
0.295089989900589,
0.23888006806373596... | |
I have a tooltip being used on hover from a tr. I am using overflow to hide a few so a user can scroll down to see all of them. How can I update the position of the element within the overflow so the tooltip shows up correctly?
The code I have is as follows
```
$('.toolTips tbody tr').each(function () {
// options
va... | [
0.3769150376319885,
-0.279485285282135,
0.635583758354187,
-0.14924819767475128,
0.23673473298549652,
0.3473115563392639,
0.3103756010532379,
-0.7134793996810913,
0.03830055892467499,
-0.4930576980113983,
0.18585623800754547,
0.7186240553855896,
-0.2336193025112152,
-0.12125690281391144,
... | |
// stops the hide event if we move from the trigger to the popup element
if (hideDelayTimer) clearTimeout(hideDelayTimer);
// don't trigger the animation again if we're being shown, or already visible
if (beingShown || shown) {
return;
} else {
beingShown = true;
// reset position of popup box
... | [
0.07551167905330658,
-0.2914305031299591,
0.5636113882064819,
-0.12959107756614685,
0.2591359615325928,
0.03724285215139389,
0.6518388390541077,
-0.23595739901065826,
-0.31726476550102234,
-0.42663702368736267,
-0.6384578347206116,
0.2105528712272644,
-0.3409665524959564,
-0.12068143486976... | |
// (we're using chaining on the popup) now animate it's opacity and position
.animate({
top: '-=' + distance + 'px',
opacity: 1
}, time, 'swing', function() {
// once the animation is complete, set the tracker variables
beingShown = false;
shown = true;
});
}
}).mouseout(func... | [
0.23996566236019135,
-0.4889642298221588,
0.6672868132591248,
-0.06621599942445755,
0.33804818987846375,
0.2786239981651306,
0.3477282226085663,
-0.4081520438194275,
-0.08424469828605652,
-0.6542651057243347,
0.06305248290300369,
0.6522277593612671,
-0.3350337743759155,
-0.2656331360340118... | |
if (hideDelayTimer) clearTimeout(hideDelayTimer);
// store the timer so that it can be cleared in the mouseover if required
hideDelayTimer = setTimeout(function () {
hideDelayTimer = null;
popup.animate({
top: '-=' + distance + 'px',
opacity: 0
}, time, 'swing', function () {
// once ... | [
0.5404969453811646,
-0.4861135482788086,
0.4398006200790405,
-0.39213961362838745,
0.37982121109962463,
-0.03267659991979599,
0.5921306610107422,
-0.6811684966087341,
-0.08024919778108597,
-0.27166178822517395,
-0.19966870546340942,
0.4897136390209198,
-0.493056982755661,
-0.36605998873710... | |
doesn't do the job)
popup.css('display', 'none');
});
}, hideDelay);
});
});
```
Here is my testing environment
<http://listeningbirddevelopment.com/portal/>
You are setting the popup position based on the initial position of the table row. Once you scroll that is no longer a valid position. Move the tri... | [
-0.04491349309682846,
-0.0952354371547699,
0.5340853333473206,
-0.23592491447925568,
0.656080424785614,
-0.15697205066680908,
0.39041781425476074,
0.04511616379022598,
0.11763656139373779,
-0.5541591048240662,
-0.35230836272239685,
0.7375391721725464,
-0.42932820320129395,
0.02319506555795... | |
I have a question concerning JNI:
```
JNIEXPORT jintArray JNICALL Java_MainClass_intArrayMethod
(JNIEnv *env, jobject obj, jintArray array) {
jintArray result;
jsize len = (*env)->GetArrayLength(env, array);
jint *body =(*env)->GetIntArrayElements(env, array, 0);
...
}
```
Can i do some loops and mod... | [
0.5518051385879517,
-0.3627029359340668,
0.4245414733886719,
0.36026516556739807,
-0.13356022536754608,
0.08535880595445633,
0.11253716051578522,
-0.379535436630249,
-0.12110992521047592,
-0.45584478974342346,
0.19282320141792297,
0.5309135317802429,
-0.0189565010368824,
-0.137322530150413... | |
do? You're returning a new array anyway, why modify the argument array as well? | [
0.4132777452468872,
0.13885921239852905,
0.0817379280924797,
0.1559847891330719,
-0.2697557210922241,
0.06328407675027847,
-0.0452541708946228,
-0.28514760732650757,
-0.21084058284759521,
-0.23664863407611847,
-0.021798238158226013,
0.4480728209018707,
-0.20953327417373657,
0.0220300629734... | |
I know this might be a little "basic" but I've looked at every tutorial possible, and they don't tell me.
So Question 1:
I am trying to put a link in the JMenuBar, how about would I go on doing that?
Question 2:
When I try to add something to a menu bar, it doesn't add it.
I have all of my imports right and I get... | [
0.34738045930862427,
0.04617447033524513,
0.3351098895072937,
-0.03703960403800011,
-0.22351281344890594,
-0.054345156997442245,
0.4792397916316986,
-0.3494880199432373,
-0.21021915972232819,
-0.7264037728309631,
-0.08555752784013748,
0.4877626597881317,
-0.6373090744018555,
0.326901257038... | |
JMenu file = new JMenu("File");
mb.add(file);
```
You can use the codecs module to write unicode data to the file
```
import codecs
file = codecs.open("out.txt", "w", "utf-8")
file.write(something)
```
'print' outputs to the standart output and if your console doesn't support utf-8 it can cause such error even ... | [
-0.05605635792016983,
0.19108828902244568,
0.3358006179332733,
-0.35943907499313354,
-0.34615930914878845,
0.12641355395317078,
0.4503265619277954,
-0.5535822510719299,
0.13251827657222748,
-0.9448432922363281,
-0.25882869958877563,
0.43445631861686707,
-0.32632535696029663,
0.162972211837... | |
I am not familiar with using event handlers, and I was wondering if anyone had or could direct me to some code that shows how to use an event handler that will execute code on the Close/Closed event?
I know this can be done because of this answered question:
[Run code on WPF form close](https://stackoverflow.com/ques... | [
0.0515478141605854,
0.05499901622533798,
0.44621407985687256,
-0.018253833055496216,
0.09472949057817459,
-0.4601656198501587,
0.23487848043441772,
-0.011620225384831429,
-0.24790190160274506,
-0.5787521600723267,
-0.33334586024284363,
0.537211000919342,
-0.39336758852005005,
0.09546152502... | |
I have the following SQL command that I need to save as a csv file with column headers:
```
mysql > SELECT a.last_name, a.first_name, username, is_active, graduation
FROM auth_user a
INNER JOIN
userprofile_userprofile u
ON a.id = u.user_id
WHERE a.id>39 AND a.is_active... | [
-0.015455498360097408,
0.4676424562931061,
0.4689503014087677,
-0.21059313416481018,
-0.021092839539051056,
0.23429058492183685,
0.14614789187908173,
-0.05577850341796875,
-0.11776138842105865,
-0.5371167659759521,
-0.12056013941764832,
0.311014324426651,
-0.23645496368408203,
0.2265616655... | |
work:
```
SELECT 'LastName', 'FirstName', 'Username', 'IsActive', 'Graduation'
UNION ALL
SELECT a.last_name, a.first_name, username, is_active, graduation
INTO OUTFILE 'yourFile.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
FROM auth_user a
INNER JOIN userprofile_userprofile u
ON a.id = u.user_id
WHERE a.i... | [
0.2982695996761322,
0.1900082528591156,
0.6360292434692383,
-0.1899598091840744,
0.21795760095119476,
0.1325732320547104,
0.028661493211984634,
-0.4582781195640564,
-0.44410839676856995,
-0.5040832757949829,
-0.49170684814453125,
0.48094016313552856,
-0.044899601489305496,
0.22290536761283... | |
I am trying to create an RDP file on a computer programmatically.
I am taking the username and password from a PROPERTIES file, and trying to use `CryptProtectData()` to encrypt it to a vlaid format. I then generate the string `password 51:b:<encrypted password>` and store it in the .RDP file.
When I look in the RDP f... | [
0.3107801079750061,
0.42014795541763306,
0.027341844514012337,
-0.2356480360031128,
-0.05368243530392647,
-0.23037207126617432,
0.33730587363243103,
-0.3749733865261078,
-0.08244393020868301,
-0.47059959173202515,
-0.29698655009269714,
0.6472892761230469,
-0.19769857823848724,
0.0420436374... | |
this code:
```
FileWriter fstream = new FileWriter(rdpFile);
BufferedWriter out = new BufferedWriter(fstream);
out.write("full address:s:"+remoteServerIP);
out.write("\nusername:s:"+username);
byte[] passwordBytes = password.getBytes();
out.write("\npassword 51:b:"+Crypt32Util.cryptProtectData(passwordBytes));
```
I... | [
-0.23326708376407623,
0.19389893114566803,
0.7150158286094666,
-0.11404606699943542,
0.07377459853887558,
-0.32516637444496155,
0.5417277216911316,
-0.15874235332012177,
-0.18033075332641602,
-0.6034302711486816,
-0.20281696319580078,
0.6140131950378418,
-0.22364994883537292,
0.07502277940... | |
StringBuilder sb = new StringBuilder();
Formatter formatter = new Formatter(sb);
for (byte b : bytes) {
formatter.format("%02x", b);
}
return sb.toString();
}
``` | [
-0.031724873930215836,
0.017688017338514328,
0.4908509850502014,
-0.5060352087020874,
-0.08307815343141556,
0.23058339953422546,
0.29542404413223267,
-0.6733431220054626,
-0.3210279643535614,
-0.3720577359199524,
-0.3863263428211212,
0.1292991191148758,
-0.4254333972930908,
0.2158773243427... | |
I'm making a online game (with hopefully thousands of players each hour) which uses quite a few queries to the mysql database. Before release, It would be nice if I could simulate heavy usage to see the performance. Is there anyway to do this?
Thanks in advance
Look at `mysqlslap`. It is a load emulator that lets you... | [
0.5618926286697388,
-0.364413321018219,
0.2315472811460495,
0.10492472350597382,
-0.03353949636220932,
-0.3058463931083679,
0.1744801253080368,
0.27397727966308594,
-0.3222017288208008,
-0.7919771075248718,
0.23416675627231598,
0.6590263247489929,
-0.04111742228269577,
0.006300543900579214... | |
How can i get all my friends that likes a given page without itearting over the list of friends and the list of likes for that friend?
The dumbway would be like:
```
friends_like_page = []
for f in friends:
for l in friends.like:
if l = page_id:
friends_like_page.append(f)
```
But i'm wondering if... | [
0.16153210401535034,
0.11551649123430252,
0.5706395506858826,
0.1975080966949463,
-0.13074301183223724,
-0.030024312436580658,
0.002204529708251357,
0.1205017939209938,
-0.11176672577857971,
-0.572489857673645,
0.12041161209344864,
0.33971354365348816,
-0.03531400114297867,
0.1522262841463... | |
that helped me.
**Advance #1:**
Ok, i've got this right now:
*Fetch all friends:*
```
SELECT uid2 FROM friend WHERE uid1 = me()
```
*Fetch page fan from a user **UID**:*
```
SELECT uid, page_id FROM page_fan where uid = UID
```
*Combined*:
```
SELECT uid, page_id FROM page_fan WHERE uid in (SELECT uid2 FROM f... | [
-0.04725915938615799,
-0.24628683924674988,
0.7125121355056763,
-0.025447551161050797,
-0.23646435141563416,
-0.26084280014038086,
0.1357935518026352,
-0.27226296067237854,
-0.13718193769454956,
-0.8155713081359863,
0.15319009125232697,
0.7759470343589783,
-0.1256636381149292,
0.0803649201... | |
you are currently using. | [
0.31511640548706055,
0.3043100833892822,
0.0061150286346673965,
0.07559315860271454,
0.3297121226787567,
-0.3096425533294678,
0.1505528688430786,
0.04267588630318642,
-0.25470077991485596,
-0.6352359652519226,
-0.059426456689834595,
0.5719310641288757,
-0.062838613986969,
0.095861934125423... | |
I have a postgres database that I want to know some quick stats. For instance, which tables are taking up the most space? I don't need anything fancy, command line is all I need. What is a good tool for this?
The functions you want are here:
<http://www.postgresql.org/docs/current/interactive/functions-admin.html#FUNC... | [
-0.04000352695584297,
0.14330418407917023,
0.6092526912689209,
0.14589551091194153,
-0.19988226890563965,
0.34601080417633057,
-0.15428565442562103,
0.03009912557899952,
-0.4552157521247864,
-0.738681435585022,
-0.16330298781394958,
0.41198140382766724,
-0.1135622188448906,
0.0509260892868... | |
I'm building a CD for a client that contains a video training course. I am building it in HTML and JavaScript. I wish this to auto-play the index.html file on windows & Mac.
I understand Windows 7 doesn't auto-play by default, but I just want some advice on how to make this as seamless as possible. Everything I've do... | [
0.7711596488952637,
0.09625257551670074,
0.3538343608379364,
0.05393322929739952,
-0.2308678925037384,
-0.35528960824012756,
0.421593576669693,
0.025562137365341187,
-0.3233838975429535,
-0.6075230240821838,
-0.31824058294296265,
1.1338510513305664,
-0.395571231842041,
0.07270841300487518,... | |
do this, and often have custom background images.
e.g. When making an AOL CD, after making my disk image (can be an .ISO, .DMG, etc) I've done something like this after my automated build step:
> $ hdiutil mount -readwrite /path/to/disk-image.ISO
>
>
> $ bless --folder /Volumes/MyDisc --openfolder /Volumes/MyDisc
... | [
0.3011462390422821,
-0.055491648614406586,
0.6474283337593079,
-0.20555439591407776,
-0.06513066589832306,
-0.2872597575187683,
0.0587032176554203,
-0.018554260954260826,
-0.2581889033317566,
-0.8624935746192932,
-0.1692918837070465,
0.7852640151977539,
-0.2946229875087738,
-0.050687395036... | |
10.7+ (if you don't have the developer tools installed) is:
> chflags hidden "/Volumes/MyDisc/CD Background Image.png"
NOTE: If you mount the disk image again before burning, there is a good chance you will lose any configuration done and will need to repeat this process.
If you just have one partition on the disk (... | [
0.061305370181798935,
-0.18762454390525818,
0.4821125864982605,
-0.06313713639974594,
-0.1161162480711937,
-0.2194763720035553,
0.32429203391075134,
0.13678304851055145,
-0.3621027171611786,
-0.9060970544815063,
-0.3901733458042145,
0.7537628412246704,
-0.2876768112182617,
-0.1317153871059... | |
want to consider using something like Mozilla Prism <http://prism.mozillalabs.com/> for a slick experience for HTML content deployment. | [
0.43402597308158875,
-0.33885839581489563,
0.0010123398387804627,
0.4389989674091339,
0.05419079586863518,
-0.41754859685897827,
0.08889374881982803,
0.5136719942092896,
-0.4315614700317383,
-0.5219332575798035,
0.23321104049682617,
0.49770355224609375,
-0.05869403854012489,
-0.09920906275... | |
I made a mistake when I rebase to a recent commit. ( I forgot to `git fetch --all` first, then rebase), and I've committed and pushed to the remote branch since. Now I did the rebase properly by fetching first, solved the conflicts, and pushed to the remote branch. Now, it seems all my recent commits are showing up twi... | [
-0.08931544423103333,
0.17048801481723785,
0.2458931803703308,
-0.16629086434841156,
-0.014293844811618328,
0.03360666334629059,
0.2938900291919708,
-0.18365022540092468,
-0.28336775302886963,
-0.8991734385490417,
0.16109076142311096,
0.6971154808998108,
-0.18869096040725708,
0.28383314609... | |
-i`, which sha code should I use, the original branching point sha code? or the most recent sha code?
I successfully removed the duplicate commits. Here is what I did: hard reset to the branching point, pull from origin, start git rebase -i SHACODE (original branching point), pick the commits that I want to keep, git r... | [
0.12912705540657043,
0.48901253938674927,
0.14344565570354462,
-0.1299336701631546,
-0.04714755341410637,
0.12375690042972565,
0.1543155461549759,
-0.20415323972702026,
-0.10061913728713989,
-0.6636902689933777,
0.05876825749874115,
0.21738196909427643,
-0.43983715772628784,
0.665738224983... | |
I'm implementing a book search function based on authors. I should return a query result that contains all the books written by the queried author. However, it is possible that a query for certain author names returns multiple results (e.g., a query of "Smith, W" might match "Smith, Wesson" and "Smith, Will").
So, my ... | [
0.3737086057662964,
0.40489280223846436,
0.07185619324445724,
0.2146892100572586,
-0.09696172177791595,
-0.01862531714141369,
0.07590049505233765,
-0.2164161205291748,
-0.028167912736535072,
-0.5053660869598389,
0.2108960896730423,
0.3624868094921112,
-0.33890894055366516,
0.34206089377403... | |
author
* matching the query
* get author's authorid
* search book table for book records with the same authorid
However, with the possibility of multiple authors, I have something like this in mind:
```
// search author table for authors matching the query
foreach(author_match as am){
// search book table for book... | [
0.13786697387695312,
0.49736547470092773,
0.42248204350471497,
-0.08217513561248779,
-0.11109559237957001,
-0.19187867641448975,
0.2806924283504486,
-0.22554607689380646,
-0.11340499669313431,
-0.7151995897293091,
0.12455868721008301,
0.5165719389915466,
-0.24066150188446045,
-0.0282992031... | |
from it, to an ugly output.
Again, my apologies for the pseudocode. I'll try to clean-up my code and edit ASAP but if an answer comes before that, it'd be just as awesome. Thanks.
I agree with Michael, it seems you need either an `INNER JOIN` or a `LEFT JOIN`.
You say you are using Codeigniter so here is a Codeignite... | [
-0.009817199781537056,
0.13407517969608307,
0.2903408706188202,
0.08044659346342087,
-0.200469508767128,
-0.1448289304971695,
0.42828842997550964,
-0.19083325564861298,
-0.09641151130199432,
-0.6599774360656738,
-0.2707427144050598,
0.6929210424423218,
-0.33365345001220703,
-0.070351086556... | |
I have a Page with many Comments. Many users can access this page and submit comments. I view the comments on another Page that is private.
### models/page.rb
```
class Page < ActiveRecord::Base
has_many :comments, :dependent => :destroy
accepts_nested_attributes_for :comments, :allow_destroy => true
end
```
... | [
0.10481588542461395,
0.1784626692533493,
0.7280327677726746,
-0.03254318609833717,
-0.11517979949712753,
0.02739580348134041,
0.05997108295559883,
-0.6265051364898682,
-0.06824393570423126,
-0.9694966077804565,
0.15036828815937042,
0.3027856647968292,
-0.250539630651474,
0.3245448768138885... | |
@page = Page.find(params[:id])
end
def update
@page = Page.find(params[:id])
@page.comments.build
@page.update_attributes(params[:page])
end
```
The issue here is that I do not want to have the user see multiple fields for comments. Yet, if I do `<% f.fields_for :comment do |builder| %>` then it throws an erro... | [
0.21396100521087646,
0.35075145959854126,
0.562323272228241,
-0.08676130324602127,
-0.220099076628685,
-0.09622965008020401,
0.5121673345565796,
-0.6143321990966797,
-0.23096735775470734,
-0.6516024470329285,
-0.07633012533187866,
0.41244542598724365,
-0.35792845487594604,
0.13547903299331... | |
Devise) associated with the comment.
```
<% f.fields_for :comments, f.object.comments.build do |fc| %>
<!-- rest of form -->
<% end %>
``` | [
0.03668169677257538,
0.020458368584513664,
0.5628112554550171,
-0.057335015386343,
0.1046261265873909,
-0.006491484586149454,
0.18753862380981445,
-0.5001927614212036,
0.10069434344768524,
-0.4727124571800232,
-0.5673632025718689,
0.4957888424396515,
-0.5060065388679504,
0.0204711221158504... | |
I found example of history.pushState() through stackoverflow but I don't understand what each thing does. this is what I have
```
var stateObj = {
foo: "bar"
};
history.pushStates(stateObj, "page 2", "page2.html");
```
so can anyone explain what stateObj holds and what "page 2" is in this script? Why does the ob... | [
0.01454518735408783,
0.04493054375052452,
0.6349077820777893,
-0.2795417308807373,
-0.13292296230793,
-0.0055434140376746655,
0.18591269850730896,
-0.12112708389759064,
-0.043148163706064224,
-0.8210583329200745,
-0.0866423174738884,
0.18113547563552856,
-0.61297208070755,
0.32087275385856... | |
more information there.
the second paramater is currently unused; it's recommended to pass the empty string here.
the last parameter is the URL associated with the context object. It does not change the location of the current page. | [
-0.21945735812187195,
-0.14466087520122528,
0.7004382014274597,
0.17079946398735046,
-0.02972552739083767,
-0.21423542499542236,
0.2676708996295929,
0.43057212233543396,
-0.23402103781700134,
-0.5343980193138123,
-0.26870623230934143,
0.267264723777771,
-0.09960368275642395,
0.322982192039... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.