text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
}
}
}
}
```
Either use [`Window#dispose`](http://docs.oracle.com/javase/7/docs/api/java/awt/Window.html#dispose%28%29) or [`Window#setVisible(false)`](http://docs.oracle.com/javase/7/docs/api/java/awt/Window.html#setVisible%28boolean%29). | [
0.22815176844596863,
0.21706975996494293,
0.1492781788110733,
-0.28822511434555054,
0.15097676217556,
-0.17197592556476593,
0.029692113399505615,
-0.3574013411998749,
0.17835237085819244,
-0.5375933647155762,
-0.4299294650554657,
0.731200098991394,
-0.3799727261066437,
-0.13122297823429108... | |
I need to perform a check on all drives and see if any of the VIDs/PID match a specific one, if it does I need to get the drive letter of that flash drive.
Thanks to all!
Something like this:
```
// select all links
$('a')
// check that the pathname component of href doesn't end with "/index.html"
.filter(function... | [
0.18855920433998108,
-0.06790263205766678,
0.7319363951683044,
0.07416901737451553,
0.125992551445961,
-0.39304885268211365,
0.13432395458221436,
-0.22867652773857117,
-0.1454816311597824,
-0.8424288630485535,
-0.14193260669708252,
0.7940941452980042,
-0.5125135779380798,
0.047613088041543... | |
LoadPage and prevents following the link
.click(function(e) {
e.preventDefault();
LoadPage(this.href);
});
```
Since you're dynamically loading sections of the page, you'll need to set up event delegation instead. Exactly how you go about doing this depends on the version of jQuery you're using, but you'l... | [
-0.12381303310394287,
-0.4456598162651062,
0.5714555382728577,
-0.2445044219493866,
-0.3584483563899994,
-0.2900722026824951,
0.30342891812324524,
-0.22909672558307648,
-0.37113356590270996,
-0.6023294925689697,
-0.42777547240257263,
0.5100626349449158,
-0.5989611148834229,
0.0270894598215... | |
}
});
``` | [
0.05535417050123215,
0.22359678149223328,
0.33292123675346375,
-0.44429904222488403,
0.4482058882713318,
-0.16275274753570557,
0.18889392912387848,
0.2862910032272339,
0.3227475583553314,
-0.38386330008506775,
-0.35699695348739624,
0.9355558753013611,
-0.4717769920825958,
0.204942822456359... | |
This question is specifically about how to correctly implement session security in a function/OOP/MVC based environment.
I am familiar with session security in a procedural file - if I have a control\_panel.php file that is written procedurally, I can simply check session security at the top of the page, or whenever t... | [
0.18610599637031555,
0.015398130752146244,
0.4412578046321869,
0.15548786520957947,
-0.11225401610136032,
-0.42728084325790405,
0.1733265221118927,
-0.08267755806446075,
-0.23772494494915009,
-0.5789722204208374,
-0.0996403768658638,
0.5077303647994995,
-0.29072344303131104,
0.294986426830... | |
parent::__construct();
}
public function index() {
//$this->load->view(my_view);
//run some code
}
public function function1() {
//$this->load->model(my_model);
// run some code
}
private function function2() {
//$this->load->view(my_view2);
//run some code
}
?>
```
And in a procedural php page ... | [
-0.01859639771282673,
-0.19457681477069855,
0.7472771406173706,
0.024100638926029205,
0.013566450215876102,
-0.09645556658506393,
-0.0797581896185875,
-0.2537892758846283,
-0.12265177071094513,
-0.7328511476516724,
-0.2654055655002594,
0.3957051932811737,
-0.42000812292099,
0.2136037796735... | |
if ( ! isset($_SESSION["user"]) OR (empty($_SESSION["user"]))
{
// User not logged in - so send them to the home page
redirect ("/");
}
}
}
```
Then extend the `MY_Controller` for each of your controllers you want "secure", the user wont be able to access any of them unless... | [
-0.20588532090187073,
-0.14760705828666687,
0.6221761107444763,
0.07652183622121811,
0.44894859194755554,
-0.2141447812318802,
0.10434449464082718,
0.08903440088033676,
-0.26938188076019287,
-0.7965756058692932,
-0.4208381772041321,
0.37698298692703247,
-0.321560263633728,
0.18852354586124... | |
public function __construct()
{
parent::__construct();
}
public function index()
{
//$this->load->view(my_view);
//run some code
}
public function function1()
{
//$this->load->model(my_model);
// run some code
}
}
```
See here for more info: ... | [
0.025250816717743874,
-0.11675611138343811,
0.06787824630737305,
-0.09600401669740677,
0.13771063089370728,
0.011312024667859077,
0.1083788201212883,
-0.14904680848121643,
-0.08612310141324997,
-0.6277238726615906,
-0.38545501232147217,
0.6213231086730957,
-0.5043134093284607,
0.1802363544... | |
The method `constructBuilder()` shouldn't go infinitely because it is set to loop only 10 times and the value of data.length never changes.
This loop & method infact works perfectly, until I call another method within the loop.
When I call the method `getOptions(type)` inside this loop, the value of `i` changes very ... | [
-0.009159363806247711,
0.17144717276096344,
0.41624945402145386,
-0.1338227391242981,
-0.08311653137207031,
0.07808727771043777,
0.6711342930793762,
-0.4720277786254883,
-0.27617397904396057,
-0.4361844062805176,
0.13580287992954254,
0.4195789098739624,
-0.3326472043991089,
0.1933208703994... | |
text", "btnText", "btn2text"],
["Text2", "2: more text", "btnText2", "btn2text2"],
...
];
var products, order;
function initialise() {
products = loadProducts();
order = new Order();
constructBuilder();
}
function constructBuilder() {
var qb_boxes_innerHTML = "";
... | [
-0.1532212346792221,
-0.23985715210437775,
0.6282336115837097,
-0.6211712956428528,
-0.0045060100965201855,
0.39034920930862427,
0.46618932485580444,
-0.440658301115036,
-0.18618780374526978,
-0.40665602684020996,
-0.8750799298286438,
0.6425605416297913,
-0.5204926133155823,
-0.08581706136... | |
width=100% height=100% cellpadding=0; cellspacing=0; border=0>";
box_innerHTML += "<tr><td width=100% height=\"50px\">" + data[i][0] + "</td></tr>";
box_innerHTML += "<tr><td width=100% class=\"scroll\" valign=\"top\">" + data[i][1] + getOptions(i) + "</td></tr>";
box_innerHTML += "<tr><td width=100% ... | [
-0.37281256914138794,
-0.3344882130622864,
0.9138501882553101,
-0.2372579574584961,
0.005775542929768562,
0.2085568904876709,
0.1677187979221344,
-0.8037112355232239,
-0.1033477708697319,
-0.5498191118240356,
-0.1310068666934967,
0.6794829964637756,
0.10911557823419571,
-0.2170644402503967... | |
"\" disabled/></form></td></tr>";
box_innerHTML += "</table>";
qb_boxes_innerHTML += "<div id=\"qb_box" + i + "\" class=\"qb_box\" style=\"visibility: hidden;\">" + box_innerHTML + "</div>";
}
document.getElementById("qb_boxes").innerHTML = qb_boxes_innerHTML;
document.getElementById("qb_box0").... | [
-0.1316976100206375,
-0.32219555974006653,
0.49481478333473206,
-0.42206162214279175,
0.19274596869945526,
0.3040305972099304,
0.12167990952730179,
-0.3654557764530182,
-0.18026836216449738,
-0.5658271312713623,
-0.7477744221687317,
0.6565934419631958,
-0.33559301495552063,
-0.149558737874... | |
var productsOfType = new Array();
for (i=0; i<productList.length; i++) {
if (productList[i].type == type)
productsOfType.push(productList[i]);
}
return productsOfType;
}
```
If you need any more info, please comment.
Thanks for looking.
By using `i` without `var` you're actually... | [
0.17658136785030365,
-0.36012890934944153,
0.8327316045761108,
-0.6505117416381836,
-0.1221974715590477,
0.31816330552101135,
0.19269956648349762,
-0.43327033519744873,
-0.10829159617424011,
-0.692808985710144,
-0.42634251713752747,
0.29230424761772156,
-0.48305439949035645,
0.279990375041... | |
/* ... */
}
``` | [
0.38371482491493225,
0.5531561374664307,
0.009342574514448643,
-0.06538071483373642,
0.18090547621250153,
0.03693675622344017,
0.15847553312778473,
0.31282785534858704,
0.1104462668299675,
-0.7102874517440796,
-0.2911348044872284,
0.3940694332122803,
-0.17893728613853455,
0.377919703722000... | |
I have the following formatted sample string:
```
== header == information about things ==headeragain== info can have characters like.*?{=
```
etc on just one line.
I want to parse this in to a hash such that the keys are the "==.+?==" and the values are the info after the keys. I've tried a couple of regular expre... | [
0.13418708741664886,
0.2958078682422638,
0.22579225897789001,
-0.13674816489219666,
0.08554495871067047,
0.25365200638771057,
0.15131118893623352,
-0.05924758315086365,
0.15740473568439484,
-0.6933885812759399,
-0.019386164844036102,
0.4470847547054291,
-0.2003021538257599,
0.0801621600985... | |
as I understand it. However, it will only match the first pair and go no further.
I think this problem has come from a misunderstanding of how the global modifier acts. Do I need to tweak something in one of my expressions? Or do I need to be doing something completely different?
Did you add the client-side validation... | [
0.22646388411521912,
-0.16285136342048645,
0.5398284196853638,
-0.09561803191900253,
0.22078768908977509,
0.05712888762354851,
0.1601056307554245,
-0.19843190908432007,
-0.34287410974502563,
-0.31185483932495117,
0.02694758027791977,
0.4192905128002167,
-0.2768361270427704,
-0.071414262056... | |
= new Date();
var today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
var isValid = dateValue >= today;
return isValid;
});
```
//Add an unobtrusive adapter:
```
jQuery.validator.unobtrusive.adapters.add("wrongvalue", [], function (options) {
options.rules["wrongvalue"] = true;
... | [
0.07220577448606491,
-0.3680158853530884,
0.7411308288574219,
-0.44247615337371826,
0.561590313911438,
0.18705640733242035,
0.2924705147743225,
-0.2606896758079529,
-0.27926063537597656,
-0.4739193320274353,
-0.5586336255073547,
0.5328819751739502,
-0.28991881012916565,
0.24506960809230804... | |
I'm writing an application using WPF, and I need to make something that looks like this (see image):

What control should I use for this?
If you don’t need the groupings (the “Hire as chef” and “Seek dinner invitation” headings), then [`DataGrid`](http://msdn.micr... | [
0.22761934995651245,
0.1251954436302185,
0.4404100179672241,
0.11212349683046341,
0.10966568440198898,
0.14600946009159088,
-0.10828622430562973,
-0.24505698680877686,
-0.43349605798721313,
-0.6389286518096924,
-0.15530823171138763,
0.5372375845909119,
-0.0033351315651088953,
-0.0286999624... | |
that the `DataGrid` does [support grouping](http://wpftutorial.net/DataGrid.html#grouping) as well. | [
0.013334793969988823,
-0.020078711211681366,
0.02295089140534401,
0.10559016466140747,
-0.01696954108774662,
-0.23810380697250366,
-0.18848131597042084,
-0.05347571149468422,
-0.2594168484210968,
-0.30774757266044617,
-0.3146420419216156,
0.21556104719638824,
0.01989380083978176,
-0.130349... | |
I have been struggling to make a set of reports that gives the sum of calories burned in 15 minute increments for "Teams" and "Users.
The tables I am using are as follows:
```
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id('Teams') AND OBJECTPROPERTY(id, 'IsTable') = 1)
DROP TABLE Teams;
CREATE TABLE... | [
0.227018341422081,
0.3070973753929138,
0.2641840875148773,
-0.30985522270202637,
0.01258763112127781,
0.036504410207271576,
-0.011665510945022106,
-0.2428871989250183,
-0.042377814650535583,
-0.8079959154129028,
-0.2630924880504608,
0.31342923641204834,
-0.1493152379989624,
-0.108100555837... | |
'IsTable') = 1)
DROP TABLE Team_User;
CREATE TABLE Team_User
(
Team_ID int,
User_ID int
);
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id('Workouts') AND OBJECTPROPERTY(id, 'IsTable') = 1)
DROP TABLE Workouts;
CREATE TABLE Workouts
(
Workout_ID int NOT NULL PRIMARY KEY IDENTITY (1,1),
User_ID int,
Wor... | [
0.4610310196876526,
-0.15046793222427368,
-0.00024030204804148525,
0.17675624787807465,
0.17594940960407257,
0.2511048913002014,
0.16871240735054016,
-0.5360004901885986,
-0.09441344439983368,
-0.6998277902603149,
-0.3750932216644287,
0.2991093099117279,
-0.584505558013916,
-0.288447290658... | |
VALUES ('Tim Murdock');
INSERT INTO Users (User_Name) VALUES ('Tim Smith');
INSERT INTO Team_User (Team_ID, User_ID) Values (1,1);
INSERT INTO Team_User (Team_ID, User_ID) Values (1,2);
INSERT INTO Team_User (Team_ID, User_ID) Values (2,3);
INSERT INTO LK_Workout_Type (Workout_Name, Workout_Description) VALUES ('Bike... | [
0.07608581334352493,
0.24926461279392242,
-0.1871328055858612,
0.09109114110469818,
0.26636314392089844,
0.45417076349258423,
0.3067862093448639,
-0.1974189579486847,
-0.26128971576690674,
-0.42093589901924133,
0.2105216532945633,
0.601848304271698,
-0.22444641590118408,
-0.232251256704330... | |
INTO Workouts (User_ID, Workout_Type, Start_Time, End_Time, Calories) VALUES (3,5,'3/10/2012 10:05:00 AM','3/10/2012 12:27:00 PM', 1917);
INSERT INTO Workouts (User_ID, Workout_Type, Start_Time, End_Time, Calories) VALUES (1,5,'3/10/2012 02:38:00 PM','3/10/2012 03:17:00 PM', 536);
```
One of the reports I want to gen... | [
0.3812659680843353,
0.17336131632328033,
-0.2631993293762207,
-0.06168835237622261,
0.09941050410270691,
0.1990519016981125,
0.5842682123184204,
-0.5496724247932434,
-0.25675368309020996,
-0.5878653526306152,
0.0828293040394783,
0.48597246408462524,
-0.08574885129928589,
-0.526663482189178... | |
A-Team 1810
08:45:00 AM A-Team 1810
09:00:00 AM A-Team 1810
09:15:00 AM A-Team 1810
09:30:00 AM A-Team 1810
09:45:00 AM A-Team 950
10:00:00 AM A-Team 950
10:15:00 AM A-Team 950
10:30:00 AM A-Team 950
10:45:00 AM A-Team 950
11:00:00 AM A-Team 0
....
02:30:00 PM A-Team 0
... | [
-0.4441712498664856,
0.14020337164402008,
0.01757740043103695,
-0.0009877129923552275,
-0.5338982939720154,
0.36667850613594055,
0.1521042436361313,
-0.05721866711974144,
-0.2336483895778656,
-0.8518524169921875,
0.335573673248291,
0.43970736861228943,
0.21180017292499542,
-0.3233793675899... | |
06:00:00 PM A-Team 0
In my research, I discovered that using a table to support the increments (15 mins) and joining it to my Workouts table should help. So, I created the following table:
```
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id('Tally') AND OBJECTPROPERTY(id, 'IsTable') = 1)
DROP TABLE Ta... | [
0.533064067363739,
-0.29205477237701416,
0.8928042650222778,
-0.0171873290091753,
-0.031055627390742302,
0.2030179798603058,
0.6180391311645508,
-0.46256566047668457,
-0.21967008709907532,
-0.33358222246170044,
-0.02803834155201912,
-0.09534710645675659,
0.12636765837669373,
-0.05945690348... | |
BEGIN
INSERT INTO Tally (N) VALUES (@Counter) SET @Counter = @Counter + 1
END
-----------Build the CalendarDT Table
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id('CalendarDT') AND OBJECTPROPERTY(id, 'IsTable') = 1)
DROP TABLE CalendarDT;
DECLARE @StartDT DATETIME;
SELECT @StartDT = '2012... | [
-0.1483467072248459,
-0.191312775015831,
0.5962849259376526,
-0.052027951925992966,
0.013303861953318119,
0.3055913746356964,
0.04568418487906456,
-0.5579786896705627,
-0.03390808776021004,
-0.4198600947856903,
-0.1598958969116211,
0.22253845632076263,
-0.05890485644340515,
-0.097603574395... | |
dbo.sysobjects WHERE id = object_id('Tally') AND OBJECTPROPERTY(id, 'IsTable') = 1)
DROP TABLE Tally;
```
I then tried to join my Workouts table with the following:
```
SELECT CalendarDT.TheDT AS [Date], COALESCE(SUM(Workouts.Calories),0) AS CalorieCnt, Workouts.User_ID
FROM CalendarDT
LEFT OUTER JOIN ... | [
0.022701354697346687,
0.28684791922569275,
0.2121620774269104,
-0.22388890385627747,
-0.432094931602478,
0.10511460155248642,
0.43765416741371155,
-0.9134259223937988,
-0.04705973342061043,
-0.5215528607368469,
0.051860179752111435,
0.06236821040511131,
0.047633346170186996,
-0.05543253943... | |
been able to come to the solution. But, I have a few problems:
1) I haven't figured out how to join the Team\_Name from within the JOIN statement.
2) The CalorieCnt, even if it was aggregated by Team\_Name instead of User\_ID shows the same values for each time period. It's not aggregating the totals properly for e... | [
0.5817968845367432,
0.3098146617412567,
0.17390404641628265,
0.004686650820076466,
-0.10155951231718063,
0.04046093672513962,
0.35087642073631287,
-0.17652222514152527,
-0.21227550506591797,
-0.5695211291313171,
0.5150144100189209,
0.3794051706790924,
0.1783805936574936,
-0.086531378328800... | |
I've been looking at this for a while and I'm stumped. Any help getting these reports working for an individual user and by team would be greatly appreciated!
```
WITH ranges (st) AS
(
SELECT CAST('2012-03-10 08:00:00' AS DATETIME)
UNION ALL
SELECT DATEADD(minute, 15, st)
FR... | [
0.41161036491394043,
0.10630045086145401,
0.6207853555679321,
-0.062743179500103,
0.5535750985145569,
0.19672371447086334,
0.16422957181930542,
-0.13084189593791962,
-0.18919123709201813,
-0.5383671522140503,
-0.156586155295372,
0.01815328560769558,
-0.005509288515895605,
0.530937552452087... | |
st) < CAST('2012-03-10 18:00:00' AS DATETIME)
)
SELECT st, team_name, calories
FROM (
SELECT st, team_id, COALESCE(SUM(calories), 0) AS calories
FROM ranges r
LEFT JOIN
workouts w
ON start_time < DATEADD(minute, 15, st) | [
0.3559674620628357,
-0.05722740665078163,
0.13817098736763,
-0.0354384183883667,
0.008982335217297077,
0.44993147253990173,
0.7549356818199158,
-0.4195890724658966,
-0.04586906358599663,
-0.8387934565544128,
0.1169767677783966,
0.08454696834087372,
0.12107758969068527,
-0.23569214344024658... | |
AND end_time > st
LEFT JOIN
team_user tu
ON tu.user_id = w.user_id
GROUP BY
st, team_id
) c
LEFT JOIN
teams t
ON | [
0.021794525906443596,
-0.2601567804813385,
0.4347500205039978,
-0.08875265717506409,
-0.01743576116859913,
0.0260672215372324,
0.06425600498914719,
-0.07320752739906311,
-0.02294282801449299,
-0.524503231048584,
-0.40793997049331665,
0.3328598439693451,
-0.159287229180336,
0.15546211600303... | |
t.team_id = c.team_id
ORDER BY
c.st, c.team_id
OPTION (MAXRECURSION 0)
``` | [
0.11288270354270935,
-0.28199243545532227,
0.16042175889015198,
0.042434658855199814,
0.2289784699678421,
-0.08847595006227493,
0.33930888772010803,
-0.08589262515306473,
-0.14963796734809875,
-0.4949291944503784,
-0.3736746609210968,
0.8141263723373413,
-0.3929578363895416,
-0.13475082814... | |
I am trying to develop page that will open more than popup each time i click on an image.
When I click on this image a popup menus appears with gridview filled with data according to some textboxes in the page. the problem is that when i wrote the page first time it worked but then it is not.
the code behind is
```
I... | [
0.11222749948501587,
-0.10213303565979004,
0.9218763113021851,
-0.23638376593589783,
-0.16607685387134552,
0.08721721917390823,
0.24005144834518433,
-0.05742226541042328,
-0.28401073813438416,
-0.996010959148407,
-0.1777319312095642,
0.4234338700771332,
-0.4785850942134857,
0.3018912971019... | |
DataTable dt = objPlants.getPlantsPerShipto();
gvPlant.DataSource = dt;
gvPlant.DataBind();
this.upPlant.Update();
//pnlPlant.Visible = true;
pnlPlant_ModalPopupExtender.Show();
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<legend>Order Header</legend>
... | [
-0.43613380193710327,
-0.11248991638422012,
0.5988940000534058,
0.03162254020571709,
-0.09431076794862747,
0.09769105166196823,
0.04734442010521889,
-0.314927339553833,
-0.5725191235542297,
-0.4350377023220062,
-0.44013622403144836,
0.20671264827251434,
-0.23095527291297913,
0.086887761950... | |
CssClass="textEntry"
Enabled="False"></asp:TextBox>
</p>
<p>
<asp:Label ID="ShipToLabel" runat="server"
AssociatedControlID="txtTransaction" Height="22px" Width="248px">ShipTo</asp:Label>
<asp:DropDownList ID="ddlShipto" runat="server" CssClass="textEntry"
... | [
-0.4233953654766083,
-0.11668531596660614,
0.5516364574432373,
-0.12271860986948013,
-0.2985263168811798,
0.28315499424934387,
0.03888029605150223,
-0.23079527914524078,
-0.748577356338501,
-0.5551981925964355,
-0.46485990285873413,
0.14973095059394836,
-0.10250013321638107,
0.027633110061... | |
Height="21px" Width="320px">Feed Code</asp:Label>
<asp:TextBox ID="txtFeedCode" runat="server" CssClass="textEntry">888</asp:TextBox>
<asp:RequiredFieldValidator ID="FeedCodeRequired" runat="server" ControlToValidate="txtFeedCode"
CssClass="failureNotification" ErrorMessage="Feed Code i... | [
-0.26003021001815796,
-0.2015761435031891,
0.4368094801902771,
-0.09536124765872955,
0.08155611157417297,
0.05177118629217148,
0.286163866519928,
-0.5730194449424744,
-0.2642471492290497,
-0.3639911711215973,
-0.17932990193367004,
0.508203387260437,
0.09442321956157684,
-0.1809654682874679... | |
Height="21px" Width="320px">Plant</asp:Label>
<asp:TextBox ID="txtPlant" runat="server"></asp:TextBox>
<asp:ImageButton ID="ImgBtnPlant" runat="server"
onclick="ImageButton1_Click" ImageUrl="~/Icons/Plant.png" />
</p>
<asp:UpdatePanel ID="upPlant" runat="server" UpdateMode="C... | [
-0.18907533586025238,
-0.1897248774766922,
0.5020968914031982,
-0.2218962460756302,
-0.1335853934288025,
0.423814058303833,
-0.09912346303462982,
-0.5088445544242859,
-0.40615928173065186,
-0.7067771553993225,
-0.006400759331882,
0.5845737457275391,
0.031529609113931656,
-0.342295646667480... | |
<asp:GridView ID="gvPlant" runat="server" AutoGenerateColumns="False"
DataKeyNames="Plant" onrowcommand="gvPlant_RowCommand">
<Columns>
<asp:BoundField DataField="Plant" HeaderText="Plant" SortExpression="Plant" />
<asp:BoundField DataField="PlantName" HeaderText... | [
-0.20525303483009338,
-0.25849786400794983,
0.27536723017692566,
-0.32622194290161133,
0.20218458771705627,
0.3308793902397156,
0.04451495036482811,
-0.13332556188106537,
-0.29234200716018677,
-0.6463008522987366,
-0.34169572591781616,
0.19507309794425964,
-0.24329057335853577,
-0.11823956... | |
<asp:ButtonField Text="Button" />
</Columns>
</asp:GridView>
</asp:Panel>
<ajaxToolkit:ModalPopupExtender ID="pnlPlant_ModalPopupExtender" runat="server"
DynamicServicePath="" Enabled="True" TargetControlID="pnlPlant" PopupControlID="BtnShowDialog">
</ajaxToolki... | [
-0.2209998220205307,
-0.22319436073303223,
0.3262546956539154,
0.08093119412660599,
-0.13513915240764618,
0.051019925624132156,
0.027651652693748474,
-0.26074013113975525,
-0.2325897067785263,
-0.6765218377113342,
-0.2935793995857239,
0.4598800837993622,
-0.05358185991644859,
-0.2498594522... | |
structure and configuration at the path you specify.
```
You can specify extra command-line arguments to be used every time
'rails new' runs in the .railsrc configuration file in your home directory,
or in $XDG_CONFIG_HOME/rails/railsrc if XDG_CONFIG_HOME is set.
Note that the arguments specified in the .railsrc file... | [
0.1681552529335022,
0.009005117230117321,
0.17770059406757355,
-0.10221090167760849,
0.09747004508972168,
-0.09061925113201141,
0.1361941248178482,
-0.09113210439682007,
-0.3855835497379303,
-0.8564773201942444,
-0.24965228140354156,
0.5951778888702393,
-0.26181861758232117,
-0.05094395950... | |
I am struggling with a cell padding issue in a given HTML table (generated by Drupal).
The table is the following:

I tried the following:
```
.view-thumbnails-of-tips-and-tricks {
padding: 10px 10px 10px 10px;
}
```
I want to adding paddin... | [
0.08425135165452957,
0.2733890414237976,
0.586005449295044,
-0.223501056432724,
0.09036406874656677,
-0.2050034999847412,
0.1219741553068161,
-0.4470931887626648,
-0.32188668847084045,
-0.5114708542823792,
0.0027580522000789642,
0.610381543636322,
-0.2642146348953247,
-0.169123113155365,
... | |
I'm trying to re-create a website using Umbraco. For this website I have *news items* which I am storing in a node outside the webroot:
* Content
+ Website Home
- News
+ Newsmessages
- Message 1 (created 10-10-2011)
- Message 2 (created 15-01-2012)
I would like to use URL parameters to filter the list of news... | [
0.35110795497894287,
0.1330409198999405,
0.6833220720291138,
-0.04808685928583145,
-0.2804630696773529,
-0.13419871032238007,
-0.01528837438672781,
0.07041427493095398,
-0.6093021035194397,
-0.4168344736099243,
0.06254065781831741,
0.3870013356208801,
-0.08739056438207626,
0.18429033458232... | |
in Umbraco 5 jupiter and add Custom routes in Arearegisteration.cs, there is a package by Sebastiaan Janssen Jupiter as visual Studio Plugin
<http://our.umbraco.org/projects/developer-tools/jupiter-as-visual-studio-solution>
Use this to convert your web app to MVC application and Right Click on the Area Folder and ad... | [
0.10990190505981445,
-0.08243279904127121,
0.6494224071502686,
-0.015345086343586445,
-0.043408237397670746,
0.44334790110588074,
0.08898188173770905,
-0.23226001858711243,
-0.5366824269294739,
-0.41292470693588257,
-0.27731290459632874,
0.439665287733078,
-0.12163610756397247,
-0.13171356... | |
How do you add every number between 1 and a changing number to a NSMutableArray (so that it can be shown in a UITableView)?
For example, if the changing number at the moment is 8, then the array should contain: `1, 2, 3, 4, 5, 6, 7, 8`. Thanks.
Something like:
```
int number = 8;
NSMutableArray *mutableArray = [NSMut... | [
-0.06600512564182281,
-0.39076364040374756,
0.8067307472229004,
-0.05399295315146446,
0.22651468217372894,
-0.015252023935317993,
0.1822691410779953,
-0.32980796694755554,
-0.5909770131111145,
-0.684904932975769,
-0.14815571904182434,
0.6946355700492859,
-0.050676971673965454,
0.3344500660... | |
I have ListView which is saving all data to database. For adding i have simple button and textBox which adds to database, and show to listView. Now i want thath on long item click (hold on item) will delete the selected item from list. How is possible to do thath (actualy what method to call for long click).
Here is c... | [
0.3816513121128082,
-0.25844427943229675,
0.7633807063102722,
-0.19799229502677917,
-0.1872338205575943,
0.12579195201396942,
0.17972825467586517,
-0.8149203658103943,
-0.03812840208411217,
-0.6917049288749695,
-0.190078467130661,
0.5717018842697144,
-0.5681577324867249,
0.0581331923604011... | |
savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.announce);
datasource = new CommentsDataSource(this);
datasource.open();
List<Comment> values = datasource.getAllComments();
ArrayAdapter<Comment> adapter = new ArrayAdapter<Comment>(this... | [
0.010084235109388828,
-0.47223755717277527,
0.697562038898468,
-0.2551249861717224,
0.21587924659252167,
0.2826996147632599,
0.4551321864128113,
-0.5362588167190552,
-0.28422534465789795,
-0.731187641620636,
-0.5128653049468994,
0.7393670082092285,
-0.6923202276229858,
0.03919493779540062,... | |
@SuppressWarnings("unchecked")
ArrayAdapter<Comment> adapter = (ArrayAdapter<Comment>) getListAdapter();
Comment comment = null;
switch (view.getId()) {
case R.id.add:
edit = (EditText)findViewById(R.id.editTxt);
Editable txt=(Editable)edit.getText();
... | [
0.05264156684279442,
-0.45014679431915283,
0.5686651468276978,
-0.41760143637657166,
-0.0486074797809124,
0.03739020600914955,
0.5931208729743958,
-0.725437581539154,
-0.06450330466032028,
-0.3392070531845093,
-0.4202083945274353,
0.8845726251602173,
-0.5219233632087708,
0.0587159171700477... | |
comment = datasource.createComment(input);
adapter.add(comment);
break;
}
adapter.notifyDataSetChanged();
}
@Override
protected void onResume() {
datasource.open();
super.onResume();
}
@Override
protected void onPause() | [
0.1663079410791397,
-0.21536466479301453,
0.3763221204280853,
-0.18041454255580902,
0.35153815150260925,
0.2317400872707367,
0.38302716612815857,
-0.4119543731212616,
-0.27327001094818115,
-0.4358636140823364,
-0.5071341395378113,
0.4867646396160126,
-0.7164293527603149,
0.2899335622787475... | |
{
datasource.close();
super.onPause();
}
}
```
You want a context menu basically see here: <http://developer.android.com/guide/topics/ui/menus.html#context-menu> | [
-0.010434542782604694,
-0.016994735226035118,
0.5149851441383362,
-0.2253616452217102,
0.11301922053098679,
0.12404162436723709,
-0.04319944605231285,
0.031195513904094696,
-0.22242987155914307,
-0.7473637461662292,
-0.32970449328422546,
0.7982832193374634,
-0.32480713725090027,
-0.2211255... | |
I've read some documentation on how Adaboost works but have some questions regarding it.
I've also read that Adaboost also **picks best features from data** apart from **weighting weak classifiers** to and use them in testing phase to perform classification efficiently.
**How does Adaboost pick best features from th... | [
-0.0178354661911726,
-0.03590225800871849,
-0.0738951787352562,
0.3018500506877899,
-0.41477665305137634,
-0.08978959172964096,
0.3305056393146515,
-0.030216019600629807,
-0.11857299506664276,
-1.032668113708496,
-0.2465651035308838,
0.41038763523101807,
-0.04443434998393059,
0.00325477193... | |
of best weak classifiers given the training data, so if the weak classifiers are equal to features then you will have an indication of the most useful features.
An example of weak classifiers resembling features are [decision stumps](https://en.wikipedia.org/wiki/Decision_stump). | [
-0.1662571132183075,
-0.21751265227794647,
-0.3334883749485016,
0.2603897452354431,
-0.3338085412979126,
0.11711285263299942,
0.25986942648887634,
0.16987045109272003,
-0.4306037724018097,
-0.836381196975708,
-0.26974788308143616,
0.2776429355144501,
0.03282308578491211,
-0.269370377063751... | |
I want to improve a small framework, and therefore I want to get rid of two calls to `eval`.
Let the code speak:
```
# irf.coffee (The Framework)
# Classes which are appended to the namespace 'IRF'
classes = [
"Background"
"BoundingBox"
# ...
]
# Namespace where to attach classes
@IRF = {}
# TODO: Get rid of ... | [
0.3346697688102722,
0.34649139642715454,
0.4694956839084625,
-0.15820473432540894,
-0.09989467263221741,
-0.16590842604637146,
0.238937109708786,
-0.4601457417011261,
-0.30077245831489563,
-0.41357776522636414,
0.28323549032211304,
0.5093024373054504,
-0.5974521636962891,
0.176898479461669... | |
extends IRF.Game
constructor: (width, height) ->
@background = new IRF.Background(width, height)
```
As you see, I have to use the `IRF` namespace here, but within this particular project I'd like to use it without the namespace, as I did this:
```
# Require all Class of IRF, so we won't need namespace here
# ... | [
0.20177343487739563,
0.05200262367725372,
0.569259762763977,
0.07208526134490967,
0.2994772791862488,
-0.21510683000087738,
0.20008422434329987,
-0.7705747485160828,
-0.40511640906333923,
-0.4010910093784332,
-0.2722679078578949,
0.5306935906410217,
-0.21307261288166046,
0.0749809741973877... | |
(to be more specific, a `NodeList`). You need to specify which element of that collection you want to use (just like you would when accessing an element in an array). Here I'm assuming you want the first:
```
convIdDl[0].setAttribute("align", "right");
```
As noted in the comments, you should definitely not be using... | [
0.18710483610630035,
-0.307685524225235,
0.2541729509830475,
-0.007097561843693256,
-0.0649922788143158,
-0.45208805799484253,
-0.08911791443824768,
-0.051799602806568146,
0.002598467981442809,
-0.5427640080451965,
-0.2810141444206238,
0.38677820563316345,
-0.47927770018577576,
-0.07723347... | |
I want to add an image to be a background of the header, the thing is that I don't want to add an absolute path since I'm doing this on my pc and them is to upload to my server.
should the `<?php bloginfo('template_directory'); ?>` work in the css? It is not working here.
code:
```
#branding {
background: url("<... | [
0.5591027736663818,
-0.16984823346138,
0.41651731729507446,
-0.103146031498909,
-0.11549992114305496,
-0.10304441303014755,
0.22730667889118195,
0.06246194988489151,
-0.24148838222026825,
-0.8031860589981079,
0.21521446108818054,
0.6267064809799194,
-0.2427290976047516,
0.06574144214391708... | |
this is relative to the theme.
```
#branding {
background: url("images/background2.jpg") repeat-x repeat-y;
height: 150px;
}
```
If the images directory is in a parent of the CSS file:
```
#branding {
background: url("../images/background2.jpg") repeat-x repeat-y;
height: 150px;
}
``` | [
0.4921148419380188,
0.10082671791315079,
0.696785569190979,
-0.11175075173377991,
-0.1743771731853485,
-0.2094733566045761,
0.00846804492175579,
0.10461987555027008,
-0.29521656036376953,
-0.37513670325279236,
-0.5096212029457092,
0.2588607370853424,
-0.05300585925579071,
0.470368802547454... | |
I have a user control UC\_A that contains a user control UC\_B. Each has a different view model as its data context, VM\_A and VM\_B respectively, both derived from INotifyPropertyChanged.
A command from VM\_A changes stuff that affects a property in VM\_B. UC\_B has a binding to that property. How can I cause the bin... | [
0.13465002179145813,
0.15040075778961182,
0.5074666738510132,
-0.05282081663608551,
0.052404776215553284,
0.017922447994351387,
0.12609699368476868,
0.05176069214940071,
-0.06766890734434128,
-0.6673940420150757,
0.05911654233932495,
0.602894127368927,
-0.5137727856636047,
0.37606897950172... | |
actually convert the body tag into a div tag...
```
$body = str_replace(array("<body ","</body>"),array("<div ","</div>"),$body);
```
I also used some regular expressions to remove the head, html and doctype sections from the email, I'm still looking into any side affects of doing this but so far through all the ema... | [
0.6439894437789917,
0.022313524037599564,
0.5713868141174316,
0.03480443358421326,
-0.08392102271318436,
0.09385894238948822,
0.4372471868991852,
-0.30675849318504333,
0.1693934202194214,
-0.7713825106620789,
0.007803746033459902,
0.7033372521400452,
-0.3195793330669403,
-0.467286378145217... | |
In my .vimrc file, how can I make it so that when I tab in X amount of times about (let's say 3) that when I hit return, it'll also be tabbed in 3 times?
```
:set ai
```
`ai` is auto-indent
To disable auto-indent:
```
:set ai!
``` | [
0.25624457001686096,
0.2625342011451721,
0.6668974757194519,
-0.14967432618141174,
0.0032560769468545914,
-0.12271666526794434,
0.5494750738143921,
-0.22387287020683289,
-0.10037488490343094,
-0.57203209400177,
-0.040577482432127,
0.9741231203079224,
-0.5405340790748596,
0.0784478485584259... | |
hi Stack Overflow I have a web app and I added in the Primefaces library in order to do cool things with dataTables.
I have a dataTables that displays my fields and sorts and has paging. so If I have 100 records It displayes 25 at a time and one can click ona apage to go to it, but i have so much information, it takes... | [
0.1834457516670227,
0.12415889650583267,
0.6359604597091675,
0.13205845654010773,
-0.029058804735541344,
-0.061048723757267,
0.11301811039447784,
-0.30879849195480347,
-0.32551345229148865,
-0.5386917591094971,
0.3094518780708313,
0.3801506459712982,
-0.23382656276226044,
0.051896672695875... | |
liek updating tables and whatnot.
the js looks like this:
```
function loading(){
$( "#loadingPopUp" ).dialog( "open" );
return false;
}
```
my div looks like this:
```
<div id="loadingPopUp"> | [
0.06761838495731354,
0.07696620374917984,
0.4834139347076416,
-0.3307861387729645,
-0.10885124653577805,
0.03378922492265701,
0.00035506353015080094,
-0.0820925235748291,
-0.19636906683444977,
-0.5564088225364685,
-0.11250950396060944,
0.7073282599449158,
-0.4094793200492859,
-0.1047447472... | |
<ul class="appnitro" >
<div> <p><b> Please Wait</b></p> <p><img src="/miloWeb/images/loading.gif" /></p> </div>
</ul>
</div>
```
ThedataTable is very basic:
```
<p:dataTable | [
-0.47163358330726624,
-0.2852085530757904,
0.5827596783638,
0.020734213292598724,
0.04867467284202576,
0.07174380123615265,
-0.38323989510536194,
0.017256654798984528,
-0.39653584361076355,
-0.9136459827423096,
-0.3279587924480438,
0.3437024652957916,
-0.415255606174469,
-0.027023507282137... | |
id="dataTable"
value="#{auditBB.auditList}" | [
0.2389371395111084,
0.07076181471347809,
0.2163335233926773,
0.23531967401504517,
-0.027269860729575157,
-0.46672993898391724,
-0.21049273014068604,
-0.35385721921920776,
-0.20621195435523987,
-0.23291832208633423,
0.029605494812130928,
0.47782400250434875,
-0.34060707688331604,
-0.2606087... | |
var="testVar"
rows="25" | [
-0.09910812228918076,
0.3847910463809967,
0.04685438796877861,
-0.3401283025741577,
-0.061536673456430435,
0.32724788784980774,
0.3931523561477661,
-0.515768826007843,
-0.15639634430408478,
-0.310736745595932,
0.13577550649642944,
0.3132851719856262,
0.054339002817869186,
0.011049052700400... | |
paginator="true"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,15,25,50,100">
//
//columns go here
//
</p:dataTable
```
How do I call the method in javascr... | [
-0.31419122219085693,
-0.34232771396636963,
0.5622603297233582,
0.21577399969100952,
-0.1488984227180481,
0.4133189022541046,
0.30344393849372864,
-0.27197256684303284,
-0.39946484565734863,
-0.4965468943119049,
0.0850919559597969,
0.46725204586982727,
-0.009480013512074947,
0.033832080662... | |
image description here](https://i.stack.imgur.com/5x2uY.jpg)
If you alrady integrated primefaces into your project why don't you use its [AJAX - Status](http://www.primefaces.org/showcase/ui/pprAjaxStatus.jsf)
Its very simple and does exactly the thing you want , `Ajax Status is a global indicator to inform users abou... | [
0.36952149868011475,
-0.14168047904968262,
0.553763210773468,
0.037198878824710846,
-0.42235067486763,
0.06707628816366196,
-0.0676511600613594,
-0.1172112226486206,
-0.1357138752937317,
-0.9138064980506897,
0.006486382335424423,
0.46615612506866455,
-0.44602492451667786,
-0.29053696990013... | |
I'm looking through my textbook and I'm a little confused about some of the code that is in there. In one part, they are performing pointer arithmetic in the following way:
```
void* bp;
...
bp = (void*)((char*)(bp)+16);
...
```
but later on, they do the following:
```
void* bp;
...
bp = bp+16;
...
```
I feel lik... | [
0.22888915240764618,
0.4435194134712219,
0.03186934441328049,
-0.26081836223602295,
-0.007172795012593269,
0.20674611628055573,
0.17620012164115906,
-0.17841222882270813,
-0.3397676944732666,
-0.44461798667907715,
-0.0038988341111689806,
0.3562658727169037,
-0.005309759173542261,
0.3020461... | |
integer array and not the next byte?
Similarly, I feel that if I have void\* a, then \*(a+1) should be the next 4 bytes...
Or is that not the case?
Thank you.
It's a slip-up. Arithmetic on `void *` is not defined by the standard, but some compilers offer it as an extension, behaving the same as `char *` for arithmetic.... | [
0.08438441157341003,
0.08001060038805008,
0.11226804554462433,
-0.22712641954421997,
-0.08673597872257233,
-0.005846897140145302,
0.36622416973114014,
0.24715225398540497,
-0.3299870193004608,
-0.1669589728116989,
0.014855877496302128,
0.4226573705673218,
-0.12473990768194199,
-0.073581695... | |
i am having the strangest problem with jQuery animate
when i use `marginTop` it works but just `top` does nothing
heres my fiddle: <http://jsfiddle.net/nalagg/nnqt6/1/>
any suggestions why?
<http://jsfiddle.net/nnqt6/3/>
You need a `position: relative;` attached the each of the li's which will animate down. T... | [
-0.17535702884197235,
0.020751576870679855,
0.5840017199516296,
-0.12930084764957428,
-0.23070867359638214,
0.11295629292726517,
0.030509037896990776,
-0.03367162495851517,
-0.23277002573013306,
-0.725043773651123,
0.22832819819450378,
0.5280604362487793,
0.0020868901629000902,
0.220505341... | |
I'm attempting a little EF with code first - and I can't figure out where I have gone wrong with the is simply example of my own. I'm just out of ideas, and would like to nail down where I'm going wrong...
First the simply POCO class representing a location - a location can be a RadioStation, or a Merchant. I haven't ... | [
0.5099789500236511,
0.22413797676563263,
0.4588017463684082,
0.07193731516599655,
0.4212878942489624,
-0.1867666393518448,
-0.022034138441085815,
-0.1832917034626007,
-0.10422621667385101,
-0.680688738822937,
-0.2359538972377777,
0.6282836198806763,
-0.3829611837863922,
0.37058597803115845... | |
{
}
}
public class Merchant : Location
{
public Merchant()
{
}
}
public class Location
{
public Location()
{
}
public int Loc_ID { get; set; }
public string Loc_Code { get; set; }
public string Loc_Name { get; set; }
public string Loc_Type {get;set;}
}
}
```
then the c... | [
-0.1789988875389099,
-0.09540208429098129,
0.46657228469848633,
-0.0035890156868845224,
0.6145379543304443,
0.09602051973342896,
-0.3466869592666626,
-0.08292799443006516,
-0.06515141576528549,
-0.8937214016914368,
-0.38453415036201477,
0.45784732699394226,
-0.22292321920394897,
0.46533700... | |
// Primary Key
this.HasKey(t => t.Loc_ID);
// Properties
this.Property(t => t.Loc_ID)
.HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
// Properties
this.Property(t => t.Loc_Code)
.IsRequired()
.HasMaxLength(50);
this.Property(t => t.Loc... | [
0.018337421119213104,
-0.1451868861913681,
0.5335915684700012,
-0.11724650114774704,
0.3301960229873657,
-0.23625901341438293,
0.009651968255639076,
-0.6514317393302917,
-0.22458581626415253,
-0.5769248604774475,
-0.4807177484035492,
0.41759926080703735,
-0.25114139914512634,
0.48470425605... | |
this.Property(t => t.Loc_ID).HasColumnName("Loc_ID");
this.Property(t => t.Loc_Code).HasColumnName("Loc_Code");
this.Property(t => t.Loc_Name).HasColumnName("Loc_Name");
//my discriminator property
this.Property(t => t.Loc_Type).HasColumnName("Loc_Type").HasColumnType("varchar").HasMaxLength(50... | [
-0.17786341905593872,
-0.002163410885259509,
0.6482823491096497,
-0.3448191285133362,
0.40549567341804504,
-0.03479195758700371,
0.009275926277041435,
-0.5884017944335938,
-0.31817734241485596,
-0.8117368221282959,
-0.5848617553710938,
0.5453481078147888,
-0.1069897785782814,
0.48154011368... | |
=>
{
m.ToTable("Location");
m.Requires("Loc_Type").HasValue("RadioStation");
}
)
.Map<Merchant>(m =>
{
m.ToTable("Location");
m.Requires("Loc_Type").HasValue("Merchant");
}
) | [
-0.1001402735710144,
-0.0625656247138977,
0.838521420955658,
-0.18480470776557922,
0.6756239533424377,
0.036854516714811325,
0.2731865644454956,
-0.5776691436767578,
-0.2159704715013504,
-0.9752464294433594,
-0.8092872500419617,
0.924747109413147,
-0.38480302691459656,
0.0924532413482666,
... | |
;
}
}
}
```
here is the context:
```
namespace EFDataClasses
{
public class MyContext : DbContext
{
static MyContext()
{
Database.SetInitializer<MyContext>(new DropCreateDatabaseAlways<MyContext>());
}
public DbSet<EFDataClasses.Entities.Location> Locations {get; set;}
protecte... | [
0.060540176928043365,
0.1013362929224968,
0.9524999260902405,
0.003563154488801956,
0.35269472002983093,
-0.13896891474723816,
0.12376582622528076,
-0.3629649579524994,
-0.1806514859199524,
-0.5570266842842102,
-0.6801692247390747,
0.6863622665405273,
-0.4467082917690277,
0.386615842580795... | |
static void Main(string[] args)
{
var db = new EFDataClasses.MyContext();
db.Locations.Add(new EFDataClasses.Entities.RadioStation() { Loc_Name = "Radio Station Name 1", Loc_Code = "RD1" });
int chngs = db.SaveChanges();
System.Diagnostics.Debugger.Break();
}
}
}
```
The error tha... | [
0.23367252945899963,
0.12514260411262512,
0.48199814558029175,
-0.3071235716342926,
0.1903401017189026,
-0.19912828505039215,
0.6943358182907104,
-0.23244714736938477,
-0.040682028979063034,
-0.2792104184627533,
-0.32248616218566895,
0.6766219735145569,
-0.5108715891838074,
0.4985855221748... | |
the appropriate location type - EF give me another error....
arggghhh!
In the end I would like to make Location abstract but does that mean I can drop the hasvalue("Location")?
I would like to move on here, but I'm curious where I have done wrong. thanks!
<http://jsfiddle.net/nnqt6/3/>
You need a `position: relativ... | [
-0.2306421846151352,
-0.08860135078430176,
0.5372567176818848,
0.048120081424713135,
0.11619000136852264,
-0.11860930174589157,
0.06385311484336853,
0.04884574934840202,
-0.031788408756256104,
-0.8267752528190613,
-0.26322901248931885,
0.4884348213672638,
-0.03133350983262062,
0.0720885619... | |
Hi I need to make an dynamic array like this:
I have a max number of 25000 and 62 as exponential(?) number.
```
Array
(
[0] => 0
[1] => 3844 // 62 * 62
[2] => 238328 // 62 * 62 * 62 <---
[3] => 14776336 // 62 * 62 * 62 * 62
)
```
This is just an example of what I need: calculate the array va... | [
0.05967755243182182,
-0.002203117124736309,
0.8399917483329773,
-0.19561725854873657,
0.1295018494129181,
0.13840702176094055,
0.18174631893634796,
-0.603502631187439,
-0.32663533091545105,
-0.5356939435005188,
0.05056225508451462,
0.33980658650398254,
-0.37265151739120483,
0.0200817789882... | |
total function:
```
function getpowers($base, $maxvalue){
$max = floor(log($maxvalue,$base));
return array_map(function($value) use ( $base ) {return pow($base,$value);},range(0,$max));
}
var_dump(getpowers(62,25000));
``` | [
0.20447823405265808,
-0.18772774934768677,
0.5979020595550537,
-0.12938016653060913,
0.2106393426656723,
0.2777878940105438,
0.14526858925819397,
-0.555980384349823,
-0.3730472922325134,
-0.3693920373916626,
-0.41405150294303894,
0.3858104944229126,
-0.03765026107430458,
-0.017848694697022... | |
I've been trying to learn C, and I'm stuck on including libraries. I need to use strcpy(), but that method is included in the iostream library, but whenever I try to include the library, the program gives me errors. I've tried using "iostream", "iostream.h", , , but it either gives me a "can't find iostream.h" error, o... | [
0.05726237967610359,
0.44317564368247986,
-0.05612749978899956,
-0.15473617613315582,
0.4639815092086792,
-0.026601683348417282,
0.4647710621356964,
0.055198702961206436,
-0.30066537857055664,
-0.5473402142524719,
-0.014908495359122753,
0.7038514018058777,
-0.4500173330307007,
0.0292469765... | |
never paste them all here):
```
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\cmath(37): error C2061: syntax error : identifier 'abs'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\cmath(37): error C2059: syntax error : ';'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\... | [
0.23711898922920227,
0.20806710422039032,
0.0890561118721962,
0.13399960100650787,
-0.04949565976858139,
0.5467861294746399,
0.61514812707901,
0.23692214488983154,
-0.1805499792098999,
-0.8278471827507019,
-0.2691558301448822,
0.6658650040626526,
-0.550366997718811,
0.26394227147102356,
... | |
visual studio 10.0\vc\include\cmath(40): error C2061: syntax error : identifier 'atan2'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\cmath(40): error C2059: syntax error : ';'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\cmath(40): error C2061: syntax error : identifier 'ceil'
1>... | [
0.06453187763690948,
0.6241849064826965,
0.32514655590057373,
-0.18503418564796448,
-0.11800885200500488,
0.38309523463249207,
0.43277493119239807,
0.09664037823677063,
-0.2553447186946869,
-0.7339857816696167,
-0.18969009816646576,
0.8941834568977356,
-0.31249111890792847,
-0.129601418972... | |
a regular library. Is there an equivalent of strcpy()? I mainly wanted to use it like this (for practice):
```
#include "stdafx.h"
#include "stdlib.h"
#include "stdio.h"
#include "conio.h"
#include "iostream"
int main(void)
{
struct person
{
int id;
char name[50];
int age;
};
... | [
-0.07329253107309341,
-0.17275531589984894,
0.34412580728530884,
-0.23046033084392548,
0.2700956463813782,
0.2993771433830261,
0.3977336585521698,
-0.2373456507921219,
-0.16941553354263306,
-0.5293222665786743,
-0.32044872641563416,
0.49946874380111694,
-0.24048922955989838,
-0.13257078826... | |
p1.age);
}
```
`<iostream>` is a C++ header (it deals with input/ouput streams, as the name implies). If you want `strcpy`, you need `<string.h>`. | [
0.16059547662734985,
0.005410187877714634,
0.4010479152202606,
-0.15472950041294098,
0.05281797796487808,
0.07287854701280594,
-0.14018170535564423,
0.18721434473991394,
-0.1358504295349121,
-0.488419771194458,
-0.30100205540657043,
0.1619061678647995,
-0.283032089471817,
0.004990614484995... | |
I have a string like this:
```
var string = ' [United States] [Canada] [India] ';
```
I want to do a for loop and add each of the countries into an array in Javascript or Jquery, something like this:
```
var countryArray = new Array();
for ( each country in string AS country) {
countryArray.push(country);
}... | [
0.4708930253982544,
-0.12318193912506104,
0.38760966062545776,
-0.082415372133255,
0.09307124465703964,
-0.0933283269405365,
0.4015822112560272,
-0.016766022890806198,
-0.3704657554626465,
-0.5385369062423706,
-0.08133485913276672,
-0.21132561564445496,
-0.51609867811203,
0.146435216069221... | |
I have completed the assignment (yes it is for a programming class), but I am afraid I didn't go about it in the most efficient way possible. It is basically the uniq program, it will compare adjacent lines in a file and only print one copy of any repeated lines. A few notes: printUniq() is my own function that takes i... | [
0.2439385950565338,
-0.11886392533779144,
0.5666957497596741,
-0.13002809882164001,
0.0056558698415756226,
0.0751025453209877,
0.15409569442272186,
-0.11606935411691666,
-0.08238434046506882,
-0.6890527009963989,
0.16512228548526764,
0.33287909626960754,
-0.10441213101148605,
0.18608528375... | |
while(thisline != NULL && strcmp(prevline, thisline) == 0)
{
count++;
free(prevline);
prevline = thisline;
thisline = readline(stream);
}
printUniq(prevline, cflag, dflag, uflag, count);
count = 1;
free(prevline);
if (thisline != NULL)
{
prevlin... | [
0.3685758113861084,
-0.6135798692703247,
0.8236812353134155,
-0.3025572597980499,
0.2051232010126114,
0.2143753468990326,
0.6093001365661621,
-0.5837990045547485,
0.12038146704435349,
-0.4451443552970886,
-0.4072972238063812,
0.4224736988544464,
-0.44668886065483093,
0.04406445100903511,
... | |
= thisline;
if((thisline = readline(stream)) == NULL)
{
printUniq(prevline, cflag, dflag, uflag, count);
}
}
}
```
Is there a better way to structure this program? I hate having to check thisline for NULL three times in a loop. The first NULL check in the outer while loop i... | [
0.47793522477149963,
-0.03779564052820206,
0.30633896589279175,
-0.3643338978290558,
0.0769013911485672,
-0.042435623705387115,
0.7236074805259705,
-0.3825151324272156,
-0.014552788808941841,
-0.48141372203826904,
0.0868530198931694,
0.26886141300201416,
-0.4814265966415405,
0.169493630528... | |
lines are duplicates. The next check after the call to free basically checks if the "Duplicate loop" was exited because of thisline being null, and if not, it will allow the program to get another line. Then the next check is only there for the very last line in the file, because if it weren't there, when readline retu... | [
0.3156079053878784,
-0.2260427623987198,
0.4002855122089386,
0.48913490772247314,
0.15106388926506042,
0.23198570311069489,
0.5039145946502686,
0.3217909634113312,
-0.4758220911026001,
-0.6277578473091125,
0.041680123656988144,
-0.03891163319349289,
-0.6135214567184448,
0.28262752294540405... | |
something like this might work:
```
prevline = NULL;
count = 1;
while ((thisline = readline(stream)) != NULL) // will stay in the loop for as long as it reads from file
{
if (prevline == NULL)
{ // this is the first read from file
prevline = thisline;
continue;
}
if (strcmp(thisline... | [
0.39246100187301636,
-0.5420739054679871,
0.34047597646713257,
-0.17199824750423431,
0.26433271169662476,
-0.24160660803318024,
0.5330045819282532,
-0.30050528049468994,
-0.0991821438074112,
-0.22257402539253235,
-0.08375205844640732,
0.3055926561355591,
-0.25180840492248535,
0.25868609547... | |
different line
if (count > 1) // but after I already counted several identical
{ // so I will print the line
printUniq(prevline, cflag, dflag, uflag, count);
count = 1;
}
free(prevline);
prevline = thisline;
}
if (count > | [
0.3684280514717102,
-0.5659134984016418,
0.7250625491142273,
-0.29646170139312744,
-0.19231796264648438,
0.4169342517852783,
0.3836965560913086,
-0.5629233717918396,
-0.020924843847751617,
-0.7634732127189636,
-0.09693688899278641,
0.13472451269626617,
-0.4852425456047058,
0.04815867170691... | |
1) and (prevline != NULL)
{
printUniq(prevline, cflag, dflag, uflag, count);
}
free(prevline);
``` | [
0.3948749005794525,
-0.2955809235572815,
0.4935629665851593,
-0.28643372654914856,
-0.03973006457090378,
0.01917530968785286,
0.3230326771736145,
-0.559075117111206,
0.027449792250990868,
-0.45570674538612366,
-0.459515243768692,
0.526636004447937,
-0.7523911595344543,
-0.06325402110815048... | |
I am looking for a ctags equivalent to Haskell. I tried [hasktags](http://hackage.haskell.org/package/hasktags), but it have some problems:
In the source folder of [enumerator](http://hackage.haskell.org/package/enumerator), run `hasktags .` gives:
```
hasktags: tags: openFile: resource busy (file is locked)
```
An... | [
0.06621865928173065,
0.00396006228402257,
0.27264755964279175,
-0.10537337511777878,
-0.08382488042116165,
-0.3788992464542389,
0.5579673647880554,
-0.14479708671569824,
-0.07422880828380585,
-0.7366970181465149,
-0.03482568636536598,
0.7083784937858582,
-0.645130455493927,
-0.201673403382... | |
tags, and lushtags, which is designed to integrate with a fancy IDE-like vim tagbar thingy. In my experience hothasktags generates giant tags files and lushtags crashes as soon as it can't parse a file. Both use haskell-src-exts which means they are accurate, but will crash if they can't parse your file, and can't deal... | [
-0.0028721054550260305,
-0.2940623164176941,
0.41768956184387207,
0.3194023370742798,
0.003520615864545107,
-0.4764779210090637,
0.10021577030420303,
0.013428239151835442,
-0.16392621397972107,
-0.42922094464302063,
-0.11106212437152863,
0.5792981386184692,
-0.5979499816894531,
-0.37160560... | |
by TAGS you mean emacs tags, fast-tags doesn't do those yet, though if someone cared it would be easy to add. | [
0.764482319355011,
-0.34074386954307556,
0.3923305869102478,
0.42796894907951355,
-0.09474829584360123,
-0.11534810811281204,
0.06024259701371193,
0.040265120565891266,
-0.2255178987979889,
-0.21386300027370453,
0.15291544795036316,
0.13637381792068481,
-0.2630060017108917,
-0.217591002583... | |
I have a Windows phone 7 application that uses a local storage file (`.sdf`) to save data.
I need to synchronize that data with the SQL Server database so they can be viewed and edited from the website as well.
I have checked the examples from the Sync Framework but my problem is that no example used an `.sdf` file to... | [
0.031070712953805923,
-0.10750860720872879,
0.3002050220966339,
-0.0982077345252037,
0.11472749710083008,
-0.05859188362956047,
0.469655305147171,
0.004816316068172455,
0.18748289346694946,
-0.6968252062797546,
-0.18600232899188995,
0.9080134630203247,
-0.35273346304893494,
0.2130343616008... | |
public ADataContext (string connectionString)
: base(connectionString)
{ }
// Specify a table for the lists
public Table<Lists> Lists;
}
[Index(Columns = "ListName", Name = "_listNameUnique", IsUnique = | [
-0.2091178297996521,
-0.24205514788627625,
0.21196796000003815,
0.15565818548202515,
0.11398041993379593,
0.1794370859861374,
0.17264769971370697,
-0.35214343667030334,
-0.3421289026737213,
-0.7505968809127808,
-0.08516611158847809,
0.35567641258239746,
-0.626316487789154,
0.18360953032970... | |
true)]
[Table]
public class Lists : INotifyPropertyChanged, INotifyPropertyChanging
{
// Define ID: private field, public property, and database column.
private int _id;
[Column(DbType = "INT NOT NULL IDENTITY", IsDbGenerated = true, IsPrimaryKey = true)]
... | [
0.025145789608359337,
0.007010931149125099,
0.3966141939163208,
0.00021736868075095117,
0.1647445112466812,
0.28317344188690186,
0.2794841527938843,
-0.45232996344566345,
-0.055836889892816544,
-0.4291534721851349,
-0.12199688702821732,
0.5749779343605042,
-0.5241118669509888,
0.0987239256... | |
int Id
{
get { return _id; }
set
{
NotifyPropertyChanging("Id"); | [
0.062027089297771454,
-0.43238842487335205,
0.2897878885269165,
-0.18003703653812408,
0.2914282977581024,
-0.1376999467611313,
0.22455519437789917,
-0.45772531628608704,
0.2331089973449707,
-0.6071339249610901,
-0.3799183964729309,
0.8080775737762451,
-0.4153940677642822,
-0.39364331960678... | |
_id = value;
NotifyPropertyChanged("Id");
}
}
}
```
Is there a way to synchronize this local database (`.sdf`) with their matching tables in the SQL Server database by using the Sync Framework or will I have to do the synchronization manually?
If I have to do it manual... | [
0.2584092617034912,
0.14064858853816986,
0.3820401430130005,
0.1374741792678833,
0.25796428322792053,
-0.15406981110572815,
0.30128610134124756,
-0.189157634973526,
0.22096873819828033,
-0.5552716851234436,
0.13648825883865356,
0.7153427600860596,
-0.4202612042427063,
0.07780136913061142,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.