text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
FILE object that specifies an input stream.
[cplusplus ref](http://www.cplusplus.com/reference/clibrary/cstdio/fread.html)
`%x` reads an `unsigned int`, not a `uint16_t` (thought they may be the same on your particular platform).
To read only one byte, try this:
```
uint32_t byteTmp;
scanf("%2x", &byteTmp);
uint8_... | [
-0.04340982064604759,
-0.0007351851090788841,
0.5910816192626953,
-0.08959538489580154,
0.05739777535200119,
0.10566900670528412,
0.18835501372814178,
-0.029164589941501617,
-0.14434035122394562,
-0.581627607345581,
-0.2129931002855301,
0.1901170015335083,
-0.38982295989990234,
0.129762455... | |
I have a `<div>...</div>` section in my HTML that is basically like a toolbar.
Is there a way I could force that section to the bottom of the web page (the document, not the viewport) and center it?
I think what you're looking for is this: <http://ryanfait.com/sticky-footer/>
It's an elegant, **CSS only** solution!
... | [
0.32711878418922424,
-0.15401504933834076,
0.392537385225296,
0.12267990410327911,
0.08708951622247696,
0.30958351492881775,
0.07651294022798538,
0.40338242053985596,
-0.37103986740112305,
-0.7171979546546936,
0.4218350350856781,
0.20290881395339966,
-0.1832970529794693,
-0.014324435964226... | |
the document, not of the viewport (browser window). So if the content is shorter than the browser window, the footer sticks to the lower end of the window, if the content is longer, the footer goes down and is not visible until you scroll down.
### Twitter Bootstrap implementation
I've seen a lot of people asking how... | [
0.22151786088943481,
-0.18385863304138184,
0.5603088736534119,
0.16273877024650574,
0.17765000462532043,
-0.08476343750953674,
0.22274544835090637,
0.09615223109722137,
-0.39420756697654724,
-0.7403488755226135,
-0.09372124075889587,
0.32914504408836365,
-0.20756587386131287,
-0.2449359744... | |
100%;
margin: 0 auto -1*($footerHeight + 2); /* + 2 for the two 1px borders */
}
.push {
height: $footerHeight;
}
.wrapper > .container {
padding-top: $navbarHeight + $gridGutterWidth;
}
@media (max-width: 480px) {
.push {
height: $topFooterHeight !important;
}
.wrapper {
margin: 0 auto -1*($topF... | [
-0.2211240828037262,
-0.1769450604915619,
1.018986463546753,
-0.0441511832177639,
0.05926207825541496,
0.12509703636169434,
-0.039328984916210175,
-0.5393834114074707,
0.12732505798339844,
-0.7968395352363586,
-0.19443285465240479,
0.33130472898483276,
-0.030120715498924255,
-0.09736128896... | |
// main content with your grids, etc.
</div>
<div class="push"><!--//--></div>
</div>
<footer class="footer">
// footer content
</footer>
</body>
``` | [
0.3922334313392639,
-0.44964349269866943,
0.659027636051178,
0.095185786485672,
-0.18462781608104706,
0.02775157429277897,
-0.23718678951263428,
-0.19599568843841553,
-0.3312152326107025,
-0.9124895334243774,
-0.012181136757135391,
0.1911131590604782,
-0.0931255891919136,
0.015430349856615... | |
I've written a batch processor that runs multiple threads (pcntl\_fork) and I'm getting some weird results when child processes go defunct and don't seem to let go of their resources.
Is there a good code profiler, trace utility I can use to 'watch' the parent process and children to see what is going on?
The only pro... | [
0.3732033669948578,
0.08479191362857819,
0.10015766322612762,
0.04125989228487015,
0.06008622795343399,
-0.014132056385278702,
0.060466744005680084,
0.3820113241672516,
-0.2512776255607605,
-0.5438947677612305,
0.41147688031196594,
0.1486569195985794,
-0.05342474207282066,
0.37708371877670... | |
Hey, question says it all.
I have folding turned on in Eclipse (v3.4), and rather than having to click the little +/- in the page gutter, I'm wondering if there's a keyboard shortcut to just "fold the current method". A quick look at the menus and what-not in eclipse doesn't show a menu item for it, so maybe you just c... | [
0.07477448880672455,
-0.0031766968313604593,
0.3992171585559845,
-0.06355467438697815,
-0.24670210480690002,
-0.09207209199666977,
0.05027557909488678,
0.10594752430915833,
-0.2717353403568268,
-0.5575020909309387,
0.09179721772670746,
0.6028982996940613,
-0.04031459987163544,
0.1135709434... | |
I have Apache/2.2.11 using mod\_python 3.3.1/Python 2.5 running under Gentoo linux. In my python script I invoke a win32 exe using wine (os.popen2 call). This works fine outside of Apache but under mod\_python I get:
```
wine: cannot open /root/.wine : Permission denied
```
in /var/log/apache/error\_log. My apache i... | [
0.1878758817911148,
0.6019338369369507,
0.15853118896484375,
-0.6482610702514648,
-0.20869703590869904,
-0.3486769497394562,
0.3918723464012146,
-0.2224334329366684,
0.1351403146982193,
-0.692204475402832,
-0.03651518002152443,
0.8052088618278503,
-0.3579365909099579,
0.2329384982585907,
... | |
= Popen(cmd, shell=False, stdin=PIPE,
stdout=PIPE, stderr=PIPE, close_fds=True,
cwd=HOME, env={"HOME":HOME)
``` | [
0.08507830649614334,
0.35445287823677063,
0.45645105838775635,
-0.5882635116577148,
0.1332460343837738,
0.4369502365589142,
0.3196190297603607,
-0.14782215654850006,
-0.004250558093190193,
-0.6642529368400574,
-0.012227769941091537,
0.3680821657180786,
0.20733289420604706,
0.52348709106445... | |
I need to create many classes that are somewhere between integer and enum.
I.e. have the arithmetics of integer but also are not implicitly converted to int.
Have a look at the answer to [this question](https://stackoverflow.com/questions/352341/multiple-integer-type-classes-in-c) - BOOST\_STRONG\_TYPEDEF did exactly w... | [
0.06779509037733078,
0.03189782798290253,
0.019370252266526222,
-0.1249956339597702,
-0.010955308564007282,
0.02557929791510105,
0.2815241515636444,
-0.32089656591415405,
-0.08819018304347992,
-0.41558316349983215,
-0.04865425080060959,
0.5943503379821777,
-0.3639209568500519,
-0.116963721... | |
I'm looking for fast reporting services that are compatible with .Net (C# specifically). Additionally since many of these companies are coy about their pricing (e.g. Cognos) it would be helpful to know how expensive they tend to be.
We are doing serial reporting to PDF and Excel from a SQL Server 2005 database. Specif... | [
0.4975891411304474,
0.24799926578998566,
0.24070847034454346,
0.3319263160228729,
-0.09771239012479782,
-0.19123385846614838,
-0.212915301322937,
0.03553134202957153,
-0.3035355806350708,
-0.51352459192276,
0.2935328185558319,
0.7592253684997559,
0.004601128865033388,
-0.02418876439332962,... | |
different types of reports, but we may produce the same report several thousand times for each key item in our database. Each report will be fed by 5-15 simple queries (only a few joins and sometimes a group by). I'm not particularly concerned with the query times, but rather the time to render to a memory stream (or s... | [
0.3899856209754944,
0.14510023593902588,
0.47978925704956055,
0.1572827696800232,
-0.31106480956077576,
-0.4000021517276764,
0.06085173785686493,
-0.22758649289608002,
-0.052200689911842346,
-0.4865870177745819,
0.09635787457227707,
0.5855796933174133,
-0.12718260288238525,
0.0612505115568... | |
designer is integrated into visual studio and the management options on the server side can make even some pretty complex subscription and delivery scenarios pretty easy to accomplish. For example, data driven subscriptions give you a built in way to drive the scheduled creation of reports that are delivered via severa... | [
0.32790014147758484,
-0.4962635040283203,
0.23853348195552826,
0.37032198905944824,
-0.2978256046772003,
-0.22682304680347443,
-0.23132279515266418,
-0.15954957902431488,
-0.4552093744277954,
-0.8261210322380066,
0.2764089107513428,
0.598618745803833,
-0.1742432862520218,
0.261850059032440... | |
just the reporting server) is going to be sufficient for what you are doing. | [
0.4131089746952057,
0.15726158022880554,
0.3495756685733795,
0.19505229592323303,
0.12461870908737183,
-0.36467137932777405,
0.1512456238269806,
-0.04074271395802498,
-0.22168609499931335,
-0.5010413527488708,
0.11711405217647552,
0.49653083086013794,
-0.025368936359882355,
-0.132798984646... | |
I have code that searches for all users in a department:
```
string Department = "Billing";
DirectorySearcher LdapSearcher = new DirectorySearcher();
LdapSearcher.PropertiesToLoad.Add("displayName");
LdapSearcher.PropertiesToLoad.Add("cn");
LdapSearcher.PropertiesToLoad.Add("department");
LdapSearcher.PropertiesToLoad... | [
-0.018499327823519707,
-0.02701168693602085,
0.6448704600334167,
-0.06671649217605591,
0.022140413522720337,
-0.11385854333639145,
0.055200111120939255,
-0.19593513011932373,
-0.05074651166796684,
-0.9173901677131653,
-0.18328669667243958,
0.6105605959892273,
-0.4581170380115509,
0.0980844... | |
= All contacts (no users)
(&(objectCategory=person)) = All users and contacts
```
As for looking up the users in a group you can enumerate the list of member objects of the specific group. In the member attribute of the group object is the distinguishedName of each user.
[This article describes enumerating members ... | [
-0.049886636435985565,
0.0996769517660141,
-0.033526383340358734,
0.15686477720737457,
0.03530808538198471,
-0.0003387705364730209,
0.35914555191993713,
-0.2979515492916107,
-0.21019335091114044,
-0.44527044892311096,
-0.28496643900871277,
-0.0013053097063675523,
-0.4137630760669708,
0.069... | |
group.
Lastly, you should get in the habit of specifying a dns prefix to your query.
Without DNS prefix:
```
LDAP://ou=ouname,dc=domain,dc=com
```
With DNS prefix (all three work):
```
LDAP://servername/ou=ouname,dc=domain,dc=com
LDAP://servername.domain.com/ou=ouname,dc=domain,dc=com
LDAP://domain.com/ou=ouname... | [
-0.0009657599148340523,
-0.06255991756916046,
0.548000693321228,
0.2157885879278183,
-0.3700297474861145,
-0.1730746328830719,
0.0074957069009542465,
-0.1473396271467209,
-0.2949681580066681,
-0.7067705392837524,
-0.05867527052760124,
0.5559720396995544,
-0.4349881112575531,
0.273088693618... | |
I just posted a question about how to get a delegate to update a textbox on another form. Just when I thought I had the answer using Invoke...this happens. Here is my code:
**Main Form Code:**
```
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
us... | [
0.10146040469408035,
-0.12206602096557617,
0.4519427716732025,
-0.08136124163866043,
0.08064679801464081,
0.16859813034534454,
0.27319279313087463,
-0.21535056829452515,
-0.2429787516593933,
-0.8454223275184631,
-0.23851482570171356,
0.4072721600532532,
-0.47084352374076843,
0.425363004207... | |
public void add(string message)
{
this.Log.Items.Add(message);
}
public void logAdd(string message)
{ /////////////////////////// COMPILER ERROR BELOW ///////////
this.Invoke(new logAdd(add), new object[] { message }); // Compile error occurs here | [
-0.13875994086265564,
-0.09549133479595184,
0.0649108961224556,
-0.19891539216041565,
0.032048407942056656,
0.18931221961975098,
0.3158278465270996,
-0.22914254665374756,
-0.3382169008255005,
-0.5194420218467712,
-0.30796873569488525,
0.419144868850708,
-0.7155330777168274,
0.0711614489555... | |
}////////////////////////////// COMPILER ERROR ABOVE ///////////
private void exitProgramToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void aboutToolStripMenuItem1_Click(object sender, EventArgs e)
{
Form aboutBox =... | [
0.08085409551858902,
-0.1770397424697876,
0.6955991983413696,
-0.11229626089334488,
0.40755197405815125,
-0.14069496095180511,
0.2649361789226532,
-0.2595716714859009,
0.03210665285587311,
-0.5769513845443726,
-0.30340033769607544,
0.6659252643585205,
-0.45492008328437805,
0.21276372671127... | |
}
private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void settingsToolStripMenuItem1_Click(object sender, EventArgs e)
{
settingsForm.settings.ShowDialog();
}
private void synchronize_Click(object sender, EventArgs ... | [
-0.008581655099987984,
-0.16724765300750732,
0.41720500588417053,
0.16461209952831268,
0.5549846887588501,
-0.03393961116671562,
0.3301655948162079,
-0.0048529645428061485,
0.1819296032190323,
-0.5753186345100403,
-0.2561890780925751,
0.9895642399787903,
-0.5466846227645874,
0.148436263203... | |
string message = "Here my message is"; // changed this
ErrorLogging.updateLog(message); // changed this
}
}
public class settingsForm
{
public static Form settings = new Settings();
}
}
```
**Logging Class Code:**
```
using System;
using System.Collections.Generic;
us... | [
0.10928506404161453,
-0.27555808424949646,
0.5633552670478821,
-0.13894157111644745,
0.32805556058883667,
0.23152746260166168,
0.4652470648288727,
-0.1540684998035431,
-0.41262534260749817,
-0.5271780490875244,
-0.19314239919185638,
0.5120463967323303,
-0.49644365906715393,
0.2610300779342... | |
static Main mainClass = new Main();
static logAdd logAddDelegate;
public static void updateLog(string message)
{
logAddDelegate = mainClass.logAdd;
logAddDelegate(message);
}
}
}
```
* **Compile Error:**
*InvalidOperationException was
unhandled - Invoke o... | [
-0.3283858597278595,
-0.16247381269931793,
0.3955271244049072,
-0.16700895130634308,
0.098497174680233,
-0.000845352653414011,
0.5569281578063965,
0.0216897614300251,
-0.23304302990436554,
-0.43296656012535095,
-0.3401731848716736,
0.4730941653251648,
-0.4187428951263428,
0.417679131031036... | |
the Log item...but that didn't work. The problem is I have NO CLUE what I am doing and I have searched Google **extensively** only to find vague answers.
Please tell me how to create the handle before I invoke this delegate. While you are at it, give me some ways I can make this code more simple. For example, I dont w... | [
0.5940595269203186,
0.1173115074634552,
0.07538632303476334,
0.6411721110343933,
-0.27637842297554016,
-0.21837303042411804,
0.3402673006057739,
-0.28488844633102417,
-0.17833372950553894,
-0.6166050434112549,
0.24140822887420654,
0.384184867143631,
-0.09370341151952744,
0.1219464913010597... | |
is fairly large, but these are the only items causing this specific problem.
**Log** is my RichTextBox1 (Log.Items.Add(message)) I renamed it to Log so it is easier to retype.
I am calling updateLog(message) from a different form though...let me update that in here (although it makes no difference where I call update... | [
0.15590496361255646,
0.0880703255534172,
0.327034592628479,
-0.04713672399520874,
-0.24106691777706146,
-0.12493731826543808,
0.3805885314941406,
0.11793534457683563,
-0.44741493463516235,
-0.805223286151886,
0.1400989145040512,
0.2449115663766861,
-0.2703583836555481,
0.12044018507003784,... | |
of it too...
**SECOND EDIT:**
I believe I have located the problem, but do not know how to fix it.
In my logging class I use this code to create mainClass:
**static Main mainClass = new Main();**
I am creating a entirely new blueprint replica to Main(), including **Log** (the richtextbox I am trying to update)
Wh... | [
-0.03822823986411095,
-0.115750253200531,
0.4708125591278076,
-0.07266765087842941,
0.0537077821791172,
-0.051227208226919174,
0.46230432391166687,
0.38229015469551086,
-0.5541932582855225,
-0.7750572562217712,
0.04713268205523491,
0.5536046028137207,
-0.350960373878479,
0.4614233672618866... | |
am shooting for, thanks to one of the people that gave an answer:
```
Main mainClass = Application.OpenForms.OfType<Main>().First();
logAddDelegate = mainClass.logAdd;
logAddDelegate(message);
```
I need to create mainClass not with the new() operator because I dont want to create a new blueprint of the form I want... | [
0.41783979535102844,
0.4059027135372162,
0.6686239242553711,
-0.03573329746723175,
-0.0685124322772026,
-0.06309956312179565,
0.5116361975669861,
-0.49919822812080383,
0.0037707476876676083,
-0.44789111614227295,
0.15140147507190704,
0.7479281425476074,
-0.4565279185771942,
-0.272505432367... | |
thanks to one of the users below. Here is my updated code:
**Main Form Code:**
```
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using System.Data.OleDb;
using System.Collections.Specialized;
using System.Text... | [
0.19280830025672913,
-0.26148203015327454,
0.5428586602210999,
-0.0472714863717556,
0.05783857777714729,
0.2901551425457001,
0.4406219720840454,
-0.22848094999790192,
-0.31282973289489746,
-0.6593310832977295,
-0.2783988416194916,
0.45561128854751587,
-0.2668556869029999,
0.398971676826477... | |
return mainFormForLogging;
}
}
public Main()
{
InitializeComponent();
if (mainFormForLogging == null)
{ | [
-0.29406124353408813,
-0.5567108988761902,
0.26487258076667786,
-0.5435053706169128,
0.3134581744670868,
0.08082745969295502,
0.4910171926021576,
0.18025872111320496,
-0.1736077070236206,
-0.27919191122055054,
-0.19990277290344238,
0.3729519844055176,
-0.2480425089597702,
0.469799399375915... | |
mainFormForLogging = this;
}
}
public void add(string message)
{
this.Log.Items.Add(message);
}
public void logAdd(string message)
{
this.Log.BeginInvoke(new logAdd(add), new object[] | [
0.0858636423945427,
-0.322284996509552,
0.5529465675354004,
-0.4018873870372772,
0.11777793616056442,
0.1073712632060051,
0.49733850359916687,
-0.11707137525081635,
-0.42658767104148865,
-0.49108177423477173,
-0.19463199377059937,
0.4082682728767395,
-0.4734734892845154,
0.2871803343296051... | |
{ message });
}
private void exitProgramToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void aboutToolStripMenuItem1_Click(object sender, EventArgs e)
{
Form aboutBox = new AboutBox1(); | [
0.030645592138171196,
-0.16415700316429138,
0.6828652024269104,
-0.208483025431633,
0.23193776607513428,
-0.15137268602848053,
0.545738697052002,
-0.21205513179302216,
-0.002670352114364505,
-0.5387665033340454,
-0.5006076693534851,
0.6016053557395935,
-0.45251545310020447,
0.2581446170806... | |
aboutBox.ShowDialog();
}
private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void settingsToolStripMenuItem1_Click(object sender, EventArgs e)
{
settingsForm.settings.ShowDialog();
}
private void synchronize... | [
0.2660675048828125,
-0.08660116046667099,
0.39670512080192566,
0.11587781459093094,
0.4537840187549591,
-0.004934036172926426,
0.44471269845962524,
-0.1030464619398117,
0.21442967653274536,
-0.6843392848968506,
-0.24752402305603027,
0.838188648223877,
-0.5092000961303711,
0.166304364800453... | |
{
add("test");
Logging.updateLog("testthisone");
//DatabaseHandling.createDataSet();
}
}
public class settingsForm
{
public static Form settings = new Settings();
}
}
```
**Logging Class Code:**
```
using System;
using System.Collections.Generic... | [
0.41284844279289246,
-0.18034939467906952,
0.5381743311882019,
0.018815526738762856,
0.4007534980773926,
0.12524932622909546,
0.3104846477508545,
-0.41896581649780273,
-0.39175936579704285,
-0.37172606587409973,
-0.2343805432319641,
0.5496198534965515,
-0.3664036989212036,
0.23843966424465... | |
static Main mainClass = Main.MainFormForLogging;
static logAdd logAddDelegate;
public static void updateLog(string message)
{
logAddDelegate = mainClass.logAdd;
logAddDelegate(message);
}
}
}
```
Right, I'm going to start again.
In order to understand what ... | [
-0.11500822007656097,
-0.11932442337274551,
0.5329924821853638,
-0.28851118683815,
0.09452556818723679,
-0.1424238085746765,
0.5494676828384399,
0.36743107438087463,
-0.4593387842178345,
-0.5823141932487488,
-0.26570963859558105,
0.501129150390625,
-0.5273154973983765,
0.46517056226730347,... | |
another. .NET runs on Windows and wraps many of the native, Win32 concepts like a window, a listview, an editbox (the Win32 name for a standard textbox). This means that you can have a valid .NET instance of a TextBox or a Form, but not have the underlying Windows version of that item (EditBox, or Window) yet. When Han... | [
0.11314945667982101,
-0.35721296072006226,
0.24704967439174652,
0.23936022818088531,
-0.052325885742902756,
-0.5765367150306702,
0.1986626833677292,
-0.16626718640327454,
-0.21593129634857178,
-0.8233157396316528,
0.0034860253799706697,
0.37113356590270996,
-0.29942458868026733,
0.25700202... | |
been instantiated but before the Window handle has been created, something is trying to call logAdd. If you add a breakpoint to logAdd, you should be able to see what is doing that call. What you will find is that the call is being made on the Main instance you create in your logger class and NOT the Main instance that... | [
0.03578736633062363,
-0.3311322331428528,
0.13229626417160034,
0.10462511330842972,
0.027244864031672478,
-0.31583333015441895,
0.42640745639801025,
0.1416606456041336,
-0.41606059670448303,
-0.5575885772705078,
-0.3136692941188812,
0.4398415684700012,
-0.5238943099975586,
0.16173078119754... | |
in the Program class and called Main. You need your logger to point to this instance of main.
There are several ways to get the instance of the form, each with its own caveats, but for simplicity you could expose the instance off the Main class itself. For example:
```
public partial class Main : Form
{
private s... | [
0.16585522890090942,
-0.14365540444850922,
0.3882431387901306,
-0.1442245990037918,
-0.17578895390033722,
-0.1987150013446808,
0.45938751101493835,
-0.06100951507687569,
-0.030074220150709152,
-0.5434995293617249,
-0.37658974528312683,
0.3238031268119812,
-0.31827932596206665,
0.3657958805... | |
}
}
public Main()
{
InitializeComponent();
if (mainFormForLogging == null)
{
mainFormForLogging = this;
}
}
protected void Dispose(bool disposing)
{
if (disposing) | [
0.16731204092502594,
-0.22608132660388947,
0.09705966711044312,
-0.5825433731079102,
0.4068088233470917,
-0.183146134018898,
0.41507548093795776,
-0.14972910284996033,
-0.278612345457077,
-0.3752507269382477,
-0.26263612508773804,
0.4448980391025543,
-0.5247810482978821,
0.3770062029361725... | |
{
if (this == mainFormForLogging)
{
mainFormForLogging = null;
}
}
base.Dispose(disposing);
}
}
``` | [
0.19166035950183868,
-0.17815357446670532,
0.16032640635967255,
-0.3890824615955353,
0.30235129594802856,
-0.4379494786262512,
0.37049561738967896,
-0.10512995719909668,
-0.06660313159227371,
-0.5149426460266113,
-0.2597038447856903,
0.37018612027168274,
-0.3565906584262848,
0.397955089807... | |
Google maps is an impressive display of what you can do with JavaScript and Ajaxy-goodness. Even my mouse scroll wheel and right-click works to provide specific functionality.
In the standard HTML spec, I don't see an `onmouserightclick` event or similar basic JavaScript handling for the mouse wheel. Maybe I am lookin... | [
0.15141725540161133,
-0.002415668684989214,
0.34625566005706787,
0.4279586970806122,
-0.17967042326927185,
-0.45311644673347473,
0.3708464205265045,
0.27044522762298584,
-0.086177296936512,
-0.9506096243858337,
0.142930805683136,
0.4432840347290039,
-0.27590230107307434,
-0.212992012500762... | |
the one-button mouse.
How to I use events with the mouse wheel and right-click? I'm looking for sample code.
**EDIT:** Thanks for the jQuery code guys! The system-developer in me still has questions and doubts though. Mainly I'm concerned about platform-limitations that would seem to apply here. Is there a browser th... | [
0.21036019921302795,
-0.23513482511043549,
0.06199561804533005,
0.18803147971630096,
0.005495518911629915,
-0.05076072737574577,
0.30326852202415466,
0.18632586300373077,
-0.38862574100494385,
-0.4910348653793335,
0.27947911620140076,
0.8614162802696228,
-0.04662550985813141,
-0.2813433110... | |
level. I am glad to see it is easy in jQuery, another reason for me to get into it.
***Mouse Wheel***:
ol' no-jquery-or-prototype-library method: [here](http://adomas.org/javascript-mouse-wheel/)
Prototype method: [Here](http://www.ogonek.net/mousewheel/demo.html)
JQuery method: [Here](http://www.ogonek.net/mouse... | [
-0.2512410879135132,
0.008194114081561565,
0.11188828945159912,
0.2935793101787567,
-0.015402613207697868,
-0.17747949063777924,
0.2333948016166687,
0.08502380549907684,
-0.2645942270755768,
-0.8047001957893372,
-0.03995165973901749,
0.4851015508174896,
0.16467070579528809,
-0.332742422819... | |
I'm working on an application that will be implementing a hex value as a business key (in addition to an auto increment field as primary key) similar to the URL id seen in Gmail. I will be adding a unique constraint to the column and was originally thinking of storing the value as a bigint to get away from searching a ... | [
0.257381409406662,
0.15613223612308502,
0.4755404591560364,
0.09673301875591278,
-0.015146858058869839,
-0.09822142124176025,
0.3570369482040405,
-0.1468486785888672,
0.07957306504249573,
-0.5046713948249817,
-0.07372123003005981,
0.5742522478103638,
-0.3306697905063629,
0.2540559470653534... | |
hit would there be in simply storing the value as a varchar(x), or perhaps a char(x) over the additional work in doing the conversion to and from hex to store the value as an integer in the database? Is it worth the additional complexity?
I did a quick test on a small number of rows (50k) and had similar search result... | [
0.14803962409496307,
0.11920468509197235,
0.33416232466697693,
0.06378696113824844,
-0.2526158094406128,
0.13373468816280365,
0.006325847934931517,
-0.23125296831130981,
-0.06752591580152512,
-0.3813354969024658,
0.2553081214427948,
0.7417628765106201,
-0.3297453820705414,
0.06475997716188... | |
have found that on modern databases the performance difference on even millions of records is fairly insignificant.
A potentially larger problem is the memory that the index consumes (16 byte vs 4 byte int, for example), but on servers that I control I can allocate for that. As long as the index can be in memory, I f... | [
0.14406149089336395,
0.29302048683166504,
0.2058078795671463,
0.39129048585891724,
0.08589319884777069,
-0.06810042262077332,
-0.02075250819325447,
-0.06962674856185913,
-0.43831512331962585,
-0.7333563566207886,
0.07348708063364029,
0.6140978932380676,
-0.023811131715774536,
0.14172857999... | |
servers (which is something I care about, as our system aggregates data from child systems).
There is a graph on this article that seems to back up my suspicion: [Myths, GUID vs Autoincrement](http://krow.livejournal.com/497839.html) | [
0.517895519733429,
0.006559809669852257,
0.14361977577209473,
0.4010685682296753,
0.13905921578407288,
0.2156360000371933,
0.2980022430419922,
0.42230063676834106,
-0.6306711435317993,
-0.2820581793785095,
-0.022818485274910927,
0.3840578496456146,
0.04894764721393585,
0.035891126841306686... | |
I am trying to query for a list of stored procedure definitions using information\_schema.routines that exist in one database but not in another.
```
SELECT
t1.Routine_Definition
FROM
[server1].MyDatabase.INFORMATION_SCHEMA.Routines t1
LEFT JOIN
[server2].MyDatabase.INFORMATION_SCHEMA.Routines t2 ON t1.R... | [
0.1665094494819641,
0.2243395447731018,
0.4793544113636017,
-0.21441198885440826,
-0.34811270236968994,
0.1538810133934021,
0.1499575674533844,
-0.6013567447662354,
-0.5071961879730225,
-0.6682780385017395,
0.16970230638980865,
0.37894052267074585,
-0.3361833691596985,
0.031784724444150925... | |
to get these scripts (using code)?
The stored procedure is only displayed on one line in Management Studio. If you run the query with results to text, **or** use the following, you will get the correct line breaks:
```
declare @sql varchar(8000) -- varchar(max) in SQL 2005+
SELECT
@sql = t1.Routine_Definitio... | [
0.20801332592964172,
0.2270832657814026,
0.3064114451408386,
-0.03666863590478897,
0.048345062881708145,
-0.04650579020380974,
0.4027015268802643,
-0.38795799016952515,
-0.2691490650177002,
-0.4465228319168091,
0.017003938555717468,
0.6784887909889221,
-0.10153719782829285,
0.0036985680926... | |
I typically have several solutions open at once, and changing MSBuild verbosity manually has become a real chore.
Do it manually, using ray intersection. Use your camera matrix (if not explicit, you can query it from OpenGL), use it to generate a picking ray in world space, and see whether it intersects your particular... | [
0.09315874427556992,
-0.15612830221652985,
0.6708173751831055,
0.165012925863266,
-0.14373354613780975,
0.08631665259599686,
0.12024516612291336,
-0.1822352558374405,
-0.16889433562755585,
-0.994194746017456,
-0.040501125156879425,
0.4659872055053711,
-0.2787749469280243,
-0.08312507718801... | |
My aim is to update the look of the GUI in my app. Currently my GUI contains a lot of listboxes which are used to edit some objects in an old fashioned way, that is, user double-clicks an item and a dialog is shown to modify the corresponding object.
I think a good modern approach is how Firefox displays the extensio... | [
0.20898593962192535,
0.24054057896137238,
0.4515256881713867,
-0.04005567356944084,
-0.04355711489915848,
-0.17387041449546814,
0.08259791135787964,
-0.19690345227718353,
-0.39770379662513733,
-0.7644861340522766,
0.0015835559461265802,
0.7627156376838684,
-0.3625575006008148,
-0.067087925... | |
a very cumbersome job I'd like to avoid - the selection logic, resizings, etc...)
[](https://i.stack.imgur.com/TTLW9.png)
You can do something similar (not exactly) with standard components; TDBCtrlGrid, TSpeedButton,...
[alt text http://img8.imageshack.us/img8/9585/ima... | [
0.22122739255428314,
-0.15325866639614105,
0.40825432538986206,
0.16419367492198944,
-0.08747873455286026,
-0.09471268206834793,
0.2885284423828125,
-0.32110530138015747,
-0.383381187915802,
-0.6187418699264526,
-0.07260967791080475,
0.731788694858551,
-0.23616710305213928,
-0.104548431932... | |
I have a cell in a spreadsheet that is a date object in Excel but becomes a double (something like 39820.0 for 1/7/2009) when it comes out of C1's xls class. I read this is a Julian date format. Can someone tell me how to parse it back into a DateTime in C#?
Update: It looks like I might not have a Julian date, but in... | [
0.3386419713497162,
0.2455413043498993,
0.5638654828071594,
-0.13137702643871307,
0.16559940576553345,
-0.15702973306179047,
0.036684587597846985,
0.11811644583940506,
-0.32307714223861694,
-0.5798197388648987,
0.10849076509475708,
-0.057492151856422424,
-0.23721817135810852,
0.33136951923... | |
class Program
{
static void Main(string[] args)
{
Console.WriteLine(DateTime.FromOADate(39820.0));
}
}
}
```
outputs:
```
1/7/2009 12:00:00 AM
``` | [
-0.1295347809791565,
-0.0391446091234684,
0.46054741740226746,
-0.28833556175231934,
0.2617294490337372,
0.014393404126167297,
0.36813148856163025,
0.1531640887260437,
-0.08092018216848373,
-0.37914445996284485,
-0.41700083017349243,
0.5481337904930115,
-0.2646408975124359,
0.3978932499885... | |
I have two methods that I'm using as custom tags in a template engine:
```
# Renders a <select> form field
def select_field(options, selected_item, field_name):
options = [(str(v),str(v)) for v in options]
html = ['<select name="%s">' % field_name]
for k,v in options:
tmp = '<option '
if k ... | [
0.17396627366542816,
-0.4395380914211273,
0.5633987784385681,
-0.10671104490756989,
0.1040666252374649,
0.4016793370246887,
-0.11581069976091385,
-0.5607485175132751,
-0.24603018164634705,
-0.80229252576828,
0.006299894768744707,
0.42287933826446533,
-0.2949404716491699,
0.0073735653422772... | |
html.append(tmp)
html.append('</select>')
return '\n'.join(html)
# Renders a collection of <select> fields for datetime values
def datetime_field(current_dt, field_name):
if current_dt == None:
current_dt = datetime.datetime.now()
day = select_field(range(1, 32), current_dt.day, field_name + "_... | [
-0.01779807172715664,
-0.22920390963554382,
0.9230419993400574,
-0.3225443959236145,
0.15740080177783966,
0.47215840220451355,
0.13680242002010345,
-0.24628332257270813,
-0.2682269215583801,
-0.5122228264808655,
-0.2861036956310272,
0.00639842264354229,
-0.2756260931491852,
0.1810228526592... | |
period = select_field(['AM', 'PM'], 'AM', field_name + "_period")
return "\n".join([day, '/', month, '/', year, ' at ', hour, ':', minute, period])
```
As you can see in the comments, I'm attempting to generate select fields for building a date and time value.
My first question is, how do I make the day, month, ... | [
0.33884313702583313,
-0.11523160338401794,
0.33482813835144043,
-0.15970593690872192,
0.27498143911361694,
0.38788408041000366,
-0.11425565183162689,
-0.33707985281944275,
-0.1464286595582962,
-0.43528881669044495,
0.02234351821243763,
0.38972997665405273,
-0.1450985223054886,
0.2494651675... | |
add a "selected" attribute when the value is equal to the supplied datetime's value.
Finally, how do I get the 12-hour period identifier (AM/PM) for the supplied datetime? For the moment, I'm simply selecting 'AM' by default, but I would like to supply this value from the datetime itself.
To turn an integer range into... | [
0.22492514550685883,
-0.22059723734855652,
0.5996398329734802,
-0.05541616305708885,
0.3764602541923523,
0.4424617290496826,
-0.020650098100304604,
-0.20539075136184692,
0.04478989914059639,
-0.37842464447021484,
-0.1938818097114563,
0.42001375555992126,
0.17227675020694733,
0.086716510355... | |
current_dt
datetime.datetime(2009, 2, 4, 22, 2, 14, 390000)
>>> ['AM','PM'][current_dt.hour>=12]
'PM'
```
Voila! | [
0.23842856287956238,
-0.08847077935934067,
0.5471860766410828,
-0.02063385769724846,
0.3703094720840454,
0.09899144619703293,
0.42939478158950806,
0.1355576068162918,
-0.3696318566799164,
-0.39688512682914734,
-0.39285892248153687,
0.6629893183708191,
-0.032042495906353,
0.3323470950126648... | |
I am writing an API which includes IPC functions which send data to another process which may be local or on another host. I'd really like the send function to be as simple as:
```
int mySendFunc(myDataThing_t* thing, int sd);
```
without the caller having to know -- in the immediate context of the mySendFunc() call... | [
0.1409378945827484,
-0.10562457889318466,
0.40988433361053467,
-0.22663670778274536,
-0.17757698893547058,
-0.17335295677185059,
0.17945051193237305,
-0.05686262622475624,
-0.11119986325502396,
-0.7096027731895447,
-0.09187033772468567,
0.5315406918525696,
-0.2257767766714096,
0.1880041658... | |
been suggested that I might implement socketFamily() as:
```
unsigned short socketFamily(int sd)
{
struct sockaddr sa;
size_t len;
getsockname(sd, &sa, &len);
return sa.sa_family;
}
```
But I'm a little concerned about the efficiency of getsockname() and wonder if I can afford to do it every time I se... | [
0.3469596207141876,
0.009271488524973392,
0.18318186700344086,
-0.07937674969434738,
-0.3205545246601105,
-0.061580318957567215,
0.4218243360519409,
-0.019627051427960396,
-0.11666160821914673,
-0.8481431007385254,
-0.05548906326293945,
0.2998640537261963,
-0.031708378344774246,
0.41773170... | |
can be reused by closing and reopening it. I just looked into the glibc code and it seems *getsockname* is simply a syscall, which could be nasty performance-wise.
But my suggestion is to use some sort of object-oriented concepts. Make the user pass a pointer to a struct you had previously returned to him, i.e. have h... | [
0.4311188757419586,
0.11986786127090454,
0.07213319838047028,
0.12842386960983276,
-0.09816298633813858,
0.05422975495457649,
0.17691734433174133,
0.15432044863700867,
-0.017478717491030693,
-0.6530482769012451,
-0.0582442507147789,
0.3037774860858917,
-0.20161795616149902,
0.2478491067886... | |
I have this loaded before the radio buttons with corresponding color variable:
```
<script type="text/javascript">
//<![CDATA[
images = {"Black":"http:\/\/ecx.images-amazon.com\/images\/I\/31XwBA2m8pL.jpg", "Slate":"http:\/\/ecx.images-amazon.com\/images\/I\/31SqWkrSb6L.jpg", "White":"http:\/\/ecx.images-amazo... | [
-0.18970102071762085,
0.22345267236232758,
0.6417279839515686,
-0.11679848283529282,
0.07955028116703033,
-0.20675237476825714,
0.07770252227783203,
-0.43085429072380066,
0.05140431970357895,
-0.6464715600013733,
-0.23337723314762115,
0.6292656660079956,
-0.38609036803245544,
0.15322150290... | |
name="color"
onclick="change_large_product_image(images['Black'])"
type="radio"
value="Black" />
```
What is the value of the parameter, `url`? It looks like you may need to decode the URL string to remove the '\' characters.
```
function change_large_product_image(url) {
jQuery('.largeprod img').attr... | [
0.20940011739730835,
0.14387330412864685,
0.36153775453567505,
-0.47631916403770447,
0.322946697473526,
0.08033636212348938,
0.0015938087599352002,
-0.11415331065654755,
-0.004629176110029221,
-0.3110155463218689,
-0.5278099179267883,
0.6370044350624084,
-0.5123007297515869,
0.609640061855... | |
If I use something like:
```
using (OdbcConnection conn = new OdbcConnection(....))
{
conn.open();
my commands and sql, etc.
}
```
Do I have to do a conn.close(); or does the using statement keep me from doing that last call? Does it dispose of everything in the using block? For example, if I called other object... | [
0.15660734474658966,
0.33245232701301575,
0.35560670495033264,
-0.1685047298669815,
0.01432502456009388,
-0.6299727559089661,
0.28209665417671204,
-0.07909098267555237,
-0.0011256990255787969,
-0.5581709742546082,
-0.33605629205703735,
0.7521197199821472,
-0.4118202328681946,
0.13090865314... | |
block.
3. The using block will not clean up any other IDisposable objects. It only cleans up the declared item
* note that you can nest using blocks, or if the items are the same type, multiple items can be initialized at the same time.
See the top bit of my other answer for [How do I use the using keyword in C#](htt... | [
0.1708589792251587,
0.10161110013723373,
0.40422073006629944,
-0.04658811539411545,
-0.21549004316329956,
-0.41917696595191956,
0.5871474742889404,
-0.5620900988578796,
-0.14860688149929047,
-0.46373477578163147,
-0.26381802558898926,
0.09989558160305023,
-0.5068061947822571,
0.00395291019... | |
the dispose method. The using block is essentially just a safety net and allows writing clearer code in most circumstances.
---
[Edit]
e.g. multiple initialization in a using: initialize more than one object in the same using without having to nest using blocks if the objects are the same type:
```
using (Bitmap b1 ... | [
0.5029016137123108,
-0.1209411770105362,
-0.3766476809978485,
-0.03724372014403343,
-0.13375867903232574,
-0.25930672883987427,
0.2094784528017044,
-0.6747242212295532,
-0.04206688702106476,
-0.7095859050750732,
0.0015183859504759312,
0.3735964000225067,
-0.5748474597930908,
-0.16254377365... | |
Bitmap("filex"))
using(Graphics g = Graphics.FromImage(b))
{
}
```
It is an error to use put different objects in the same using `error CS1044: Cannot use more than one type in a for, using, fixed, or declaration statement.`
```
// error CS1044
using(Bitmap b = new Bitmap("filex"), Graphics g = Graphics.FromImage(b... | [
0.03999195620417595,
0.0199266504496336,
0.13616742193698883,
-0.08716744184494019,
-0.1528598517179489,
0.258978009223938,
0.09181179851293564,
-0.4086344242095947,
-0.3297106623649597,
-0.5033106207847595,
-0.2828958332538605,
0.7127267122268677,
-0.6707872152328491,
-0.12063959985971451... | |
What's wrong with the following code?
```
-(IBAction)numFieldDoneEditing{
NSPredicate * regexTest = [NSPredicate predicateWithFormat: @"SELF MATCHES '^\\d*\\.\\d{2}$'"];
NSString *text = [[NSString alloc] initWithFormat: @"%@", numberField.text];
if ([regexTest evaluateWithObject: text] == YES)... | [
-0.022853391245007515,
0.1126059964299202,
0.22358162701129913,
-0.2326437085866928,
0.19152584671974182,
-0.2997343838214874,
0.6348698139190674,
-0.2662246823310852,
-0.005041936878114939,
-0.3757246434688568,
0.05267808213829994,
0.6928998231887817,
-0.3261144459247589,
0.08067357540130... | |
something else
}
[text release];
[regexTest release];
}
```
This should be able to get the maximum temperatures for you, you would just have to change the where filter to get the minimums
```
using System.Xml.Linq;
\\...
XDocument xmlDoc = XDocument.Load("YourXml.xml");
var maximums =... | [
0.24972926080226898,
-0.36138734221458435,
0.6005980968475342,
-0.021231634542346,
0.21764889359474182,
-0.1965215802192688,
0.21921241283416748,
-0.3378886282444,
-0.2582376003265381,
-0.4088456928730011,
-0.12634804844856262,
0.2815217971801758,
-0.05168834701180458,
0.12515971064567566,... | |
select (string)tempvalue;
List<string> returnme = maximums.ToList<string>();
return returnme;
```
Hope this help.
Note: I'm a bit rusty with my Linq to Xml in C# so it may not be the most elegant solution. | [
0.006119902245700359,
-0.32973307371139526,
0.2926374077796936,
-0.1287788301706314,
0.005587452556937933,
-0.29617729783058167,
0.25062984228134155,
-0.32886478304862976,
0.005312305875122547,
-0.44160163402557373,
-0.1602897346019745,
0.6477131247520447,
-0.1464063823223114,
-0.192919209... | |
I have got a project that can copy files to another client's desktops in my domain.There is 300+ client machine.But there is a problem.When i run this project in a non admin user account in my domain.It cant copy files getting error about Access Denied , user restrictions.I wanna do this program like this , in non admi... | [
0.4758104681968689,
0.4982495605945587,
0.3340434432029724,
0.09462961554527283,
-0.09177189320325851,
-0.17729225754737854,
0.035306066274642944,
0.1525505930185318,
-0.36720210313796997,
-0.7862753868103027,
0.1963459998369217,
0.6537277698516846,
-0.1002926379442215,
0.4854566752910614,... | |
a similar problem: Production needed to run one of my programs that processes files on a location on the network where they don't have any access.
I ended up using Impersonation, which allowed me to run the file processing thread under a set of credentials set at runtime by my program.
In AD I created a special user ... | [
0.3745972216129303,
0.35347819328308105,
0.15192900598049164,
0.07613708823919296,
0.22355277836322784,
-0.0428168959915638,
0.3349897563457489,
-0.01823083683848381,
-0.23095270991325378,
-0.3149327039718628,
0.08210388571023941,
0.2927277684211731,
-0.31231313943862915,
0.313007295131683... | |
found these resources helpful:
[Safely Impersonating Another User](http://blogs.msdn.com/shawnfa/archive/2005/03/22/400749.aspx)
[Brian Low's ImpersonationHelper class](http://www.brianlow.com/index.php/2007/04/20/impersonate-user/)
-Jay | [
0.1579703390598297,
0.3938351571559906,
-0.2208448201417923,
-0.026935961097478867,
0.2077237367630005,
0.01543472707271576,
0.4543297290802002,
0.3172839283943176,
-0.2940136194229126,
0.2648097276687622,
0.24563239514827728,
0.2732124328613281,
0.13269495964050293,
-0.12779204547405243,
... | |
How to check if argv (argument vector) contains a char, i.e.: A-Z
Would like to make sure that argv only contains unsigned intergers
For example:
```
if argv[1] contained "7abc7\0" - ERROR
if argv[1] contains "1234\0" - OK
```
```
bool isuint(char const *c) {
while (*c) {
if (!isdigit(*c++)) return false;... | [
-0.10194387286901474,
-0.04106788709759712,
0.17663346230983734,
-0.1753082424402237,
0.024088352918624878,
-0.04489370808005333,
0.5022287368774414,
-0.3820604383945465,
-0.000715940142981708,
-0.5280295014381409,
-0.03443199768662453,
0.7967642545700073,
-0.2761726677417755,
-0.144781917... | |
I'm building an XML page inside of a function, and for some strange reason I don't get the whole thing spit out of the function. I've tried
```
return $thisXml;
}
echo $thisXML;
```
and I only get the xml declaration which is in the variable before the function.
If i put an echo in the function, i get everything b... | [
0.2845715284347534,
0.06324908882379532,
0.45847296714782715,
-0.3274618983268738,
-0.09178470075130463,
-0.16756297647953033,
0.4818345606327057,
-0.502454936504364,
-0.15201817452907562,
-0.4608248174190521,
-0.29932835698127747,
0.3513452410697937,
-0.5108247399330139,
0.269842892885208... | |
return $thisXml;
}
echo $thisXml;
```
as i said, if I replace the 'return' with 'echo', I get all the nice xml. if I echo outside the function, I only get the original declaration.
really strange, and i've been struggling with this one all day.
```
return $thisXml;
}
echo $thisXML;
```
$thisXML; only exists in t... | [
0.14776024222373962,
0.16114963591098785,
0.12473317980766296,
-0.30849647521972656,
0.06437637656927109,
-0.23690594732761383,
0.5167673230171204,
-0.08234915137290955,
-0.16091690957546234,
-0.12356557697057724,
-0.3505558967590332,
0.43021515011787415,
-0.8404836654663086,
0.20396746695... | |
I have a regular control in my code with several items.
```
<mx:List id="myList">
<mx:String>Item 1</mx:String>
<mx:String>Item 2</mx:String>
</mx:List>
```
I have some other code which runs and populates the list. How do I select the first item in the newly populated list using code?
That would be `myList.... | [
0.01874895952641964,
-0.23048590123653412,
0.23583056032657623,
0.1635209172964096,
-0.0017667453503236175,
0.25678688287734985,
-0.24872608482837677,
-0.3616087734699249,
-0.2882610857486725,
-0.6810035705566406,
-0.03206566348671913,
0.22883234918117523,
-0.38562947511672974,
-0.07871692... | |
I'm trying to modify the UI of a Redmine installation (Redmine 0.7.3.devel.2093 (MySQL)).
When you view a project in Redmine, it generates a list of all the subprojects for the project.
For example, **app/views/projects/index.rhtml** calls the **link\_to** function:
```
<% if @project_tree[project].any? %>
<p>... | [
0.13578031957149506,
0.1008702740073204,
0.5730355978012085,
-0.19065777957439423,
0.06701415777206421,
0.1872027963399887,
0.15516820549964905,
-0.2803845703601837,
-0.15552379190921783,
-0.8604382872581482,
-0.315970242023468,
0.26226893067359924,
-0.4262238144874573,
-0.0375057607889175... | |
list of subprojects is very difficult to visually parse. We'd like to have each subproject listed on its own line. (Any markup is fine -- UL, OL, or P tags on each link would be ideal, but a BR instead of a comma would be totally fine.)
What is the best way to make this change? I can't find where **`link_to`** is defi... | [
0.20176072418689728,
-0.15079933404922485,
0.4567100703716278,
0.04368916153907776,
-0.11810941994190216,
-0.11649078130722046,
0.29974666237831116,
0.23110462725162506,
-0.42194393277168274,
-0.7571402192115784,
-0.08004210144281387,
0.22082625329494476,
-0.38741305470466614,
0.3317990601... | |
can do it directly in the code you provided. Just change
```
join(', ')
```
to
```
join('<br />')
```
That should do it. | [
0.47591879963874817,
0.19203707575798035,
0.2378968447446823,
-0.02245095744729042,
0.23924802243709564,
-0.43869850039482117,
0.20633792877197266,
-0.019685879349708557,
-0.12146621197462082,
-0.688209056854248,
-0.1850210279226303,
0.7813452482223511,
-0.11819898337125778,
0.034806247800... | |
I'm trying to run the following command:
```
find . -iname '.#*' -print0 | xargs -0 -L 1 foobar
```
where "foobar" is an alias or function defined in my .bashrc file (in my case, it's a function that takes one parameter). Apparently xargs doesn't recognize these as things it can run. Is there a clever way to remedy ... | [
0.1612967848777771,
0.13205547630786896,
0.28189006447792053,
-0.13479867577552795,
0.20702770352363586,
-0.27101385593414307,
0.40540412068367004,
0.1022002175450325,
-0.1472773402929306,
-0.6417484879493713,
-0.08245839178562164,
0.7766529321670532,
-0.4577578902244568,
0.204627200961112... | |
why would they?), you can simplify this to
```
find . -iname '.#*' -print | while read -r i; do foobar "$i"; done
```
or even just `find -iname '.#*' | ...`, since the default directory is `.` and the default action is `-print`.
One more alternative:
```
IFS=$'\n'; for i in `find -iname '.#*'`; do foobar "$i"; do... | [
0.3529743552207947,
-0.1019979864358902,
-0.014868682250380516,
-0.1082746610045433,
0.07236196845769882,
-0.2943561375141144,
0.351047545671463,
-0.11031325906515121,
-0.3463825583457947,
-0.560221791267395,
-0.42448943853378296,
0.8808486461639404,
-0.22407406568527222,
-0.04712012037634... | |
I've got a flash project that due to requirements has to be backward compatible with flash 6. Everything works, except the first 6 (of 17) jpeg images that are loaded by <MovieClip>.loadMovie don't respond to changes to their alpha setting.
If I rearrange the order of the images in the XML file that is used to provide... | [
0.5476911664009094,
0.13821224868297577,
0.2835048735141754,
0.08311665058135986,
-0.12540677189826965,
-0.18072299659252167,
0.3689056634902954,
-0.05941317602992058,
-0.14081312716007233,
-0.4249219596385956,
-0.1309608370065689,
0.5958854556083679,
-0.3924599587917328,
0.188844174146652... | |
load completely first using onClipEvent(data). The images appear to pre-load before the animation starts but the alpha property still doesn't work.
Edit 2:
I justed used a wipe type transition instead of a fade. I hope to never have to use flash 6 again.
Since only your interactive shell knows about aliases, why not j... | [
0.3507447838783264,
-0.16437526047229767,
0.47882580757141113,
0.08999190479516983,
-0.14531941711902618,
-0.09445768594741821,
0.35111820697784424,
-0.1560942381620407,
-0.23749947547912598,
-0.4062756896018982,
-0.17094437777996063,
0.7721325159072876,
-0.4605943560600281,
-0.06168122217... | |
read -r i; do foobar "$i"; done
```
or even just `find -iname '.#*' | ...`, since the default directory is `.` and the default action is `-print`.
One more alternative:
```
IFS=$'\n'; for i in `find -iname '.#*'`; do foobar "$i"; done
```
telling Bash that words are only split on newlines (default: `IFS=$' \t\n'... | [
-0.049742426723241806,
0.004285559523850679,
0.1535387933254242,
-0.24975454807281494,
0.17427152395248413,
-0.23056933283805847,
0.471301794052124,
-0.09060564637184143,
-0.1681029200553894,
-0.44845885038375854,
-0.4953528344631195,
0.8995633721351624,
-0.4064946174621582,
-0.06684979796... | |
I'm trying to write a C++ windows service that can render to a texture. I've got the code working as a regular console app, but when run as a service `wglGetProcAddress()` returns NULL.
Can anyone tell me if this is possible, and if so, what do I need to do to make OpenGL work inside a service process?
---
### Edit:... | [
0.02381678856909275,
0.21327641606330872,
0.5021805167198181,
0.13094274699687958,
-0.1382843255996704,
0.015295691788196564,
0.5154902338981628,
0.5100786089897156,
-0.019742408767342567,
-0.9876870512962341,
-0.13370658457279205,
0.7379922866821289,
-0.04444780945777893,
0.22855494916439... | |
very basic generic VGA devices set to 1024 X 768 with no bells and whistles.
Services can use most GDI functions but no advanced graphics functions such as DirectX or OpenGL. So you can create windows, create or retrieve device contexts and do some fairly complex drawing and rendering but you can't use anything but st... | [
0.03674442321062088,
0.047553956508636475,
0.5468427538871765,
0.17782680690288544,
-0.037736326456069946,
-0.24209289252758026,
0.38932135701179504,
-0.07996264845132828,
-0.14548668265342712,
-0.6053634881973267,
-0.06020788848400116,
0.8603450655937195,
-0.4543880522251129,
0.1088225990... | |
```
using (FileStream fileStream = new FileStream(path))
{
// do something
}
```
Now I know the using pattern is an implementation of IDisposable, namely that a Try/Catch/Finally is set up and Dispose is called on the object. My question is how the Close method is handled.
[MSDN](http://msdn.microsoft.com/... | [
0.18758656084537506,
0.1056152954697609,
0.20728497207164764,
-0.21099938452243805,
0.05253458395600319,
-0.5274385809898376,
0.21346953511238098,
-0.2638629376888275,
-0.027173137292265892,
-0.623686671257019,
-0.21024982631206512,
0.4021209180355072,
-0.5136215090751648,
0.12225285917520... | |
call Close()?
The `using` statement *only* knows about `Dispose()`, but `Stream.Dispose` calls `Close()`, as [documented in MSDN](http://msdn.microsoft.com/en-us/library/ms227422.aspx):
> Note that because of backward
> compatibility requirements, this
> method's implementation differs from
> the recommended guidan... | [
-0.09925646334886551,
0.04724135249853134,
0.36516839265823364,
-0.49853700399398804,
-0.0443151481449604,
-0.3433867394924164,
0.08057362586259842,
-0.41691693663597107,
0.22777101397514343,
-0.31380370259284973,
-0.29530584812164307,
0.44836506247520447,
-0.6630432605743408,
0.2228041291... | |
Let's say I'm getting a large (2 million rows?) amount of data that's supposed to be static and unchanging. Supposed to be. And this data gets republished monthly. What methods are available to 1) be aware of what data points have changed from month to month and 2) consume the data given a point in time?
**Solution 1)... | [
0.3398890197277069,
-0.00570121081545949,
0.7985842823982239,
0.41099119186401367,
0.29443663358688354,
0.11159251630306244,
-0.15285125374794006,
-0.05374833941459656,
-0.5890128016471863,
-0.6387122869491577,
-0.37835830450057983,
0.3965841233730316,
-0.04597354680299759,
0.1426011770963... | |
diffs happen and store them in an EAV table, annotated by date. Space requirements are low, but consumption integrated with the original data becomes unwieldly.
**Solution 2B)** Using an in-house program, track when the diffs happen and store them in a sparsely filled table that looks much like the original table, fil... | [
0.14732171595096588,
-0.1605285406112671,
0.5975876450538635,
0.11912030726671219,
0.26983046531677246,
0.20838510990142822,
0.0567500963807106,
-0.28140756487846375,
-0.1677895039319992,
-0.6199014186859131,
-0.14297562837600708,
0.2644171118736267,
-0.060011446475982666,
0.24262389540672... | |
of differences between time periods?
Does this relate to data warehousing at all?
Smells like... Slowly changing dimension?
I had a similar problem - big flat files imported to the database once per day. Most of the data is unchanging.
Add two extra columns to the table, starting\_date and ending\_date. The default ... | [
0.30468112230300903,
-0.13926337659358978,
0.785984218120575,
-0.021172109991312027,
0.19344808161258698,
0.2882195711135864,
-0.18338464200496674,
0.25229084491729736,
-0.38473716378211975,
-0.761603593826294,
0.000999132520519197,
0.1734877973794937,
0.030694149434566498,
0.5609885454177... | |
equal, the row is already in the database and there's nothing to do; if it's different, update the existing row in the database with an ending\_date of today and insert a new row with a starting\_date of today. Read a new row from both files.
* If the key from the old file is smaller: the row was deleted. Update ending... | [
0.11359704285860062,
0.0601952001452446,
0.3958699703216553,
0.10417519509792328,
0.20192141830921173,
0.22714397311210632,
0.05521136894822121,
-0.2706228494644165,
-0.21620886027812958,
-0.7954468727111816,
-0.070766881108284,
0.5827819108963013,
-0.20537042617797852,
0.3801327049732208,... | |
new file.
Repeat until you've read everything from both files.
Now to query for the rows that were valid at any date, just select with a where clause test\_date between start\_date and end\_date. | [
0.274911105632782,
-0.128586545586586,
0.5599049925804138,
-0.10976600646972656,
0.3638846278190613,
-0.13404978811740875,
0.16720102727413177,
0.09046949446201324,
-0.3153035640716553,
-0.7785247564315796,
-0.02953532338142395,
0.4063892960548401,
-0.06978112459182739,
0.5475162863731384,... | |
When I click `togglediv`, **`commentdiv`** must be visible or hidden. The following code is running on Firefox but not Internet Explorer:
```
$(document).ready(function(){
$("#togglediv").click(function(){
if( $("#commentdiv").is(":visible") ) {
$("#commentdiv").hide("slow");
$("#... | [
0.18669235706329346,
-0.03123677521944046,
0.7330235838890076,
-0.533080518245697,
0.27834272384643555,
-0.3489024043083191,
0.48648953437805176,
-0.10878267884254456,
0.011236494407057762,
-0.6521145105361938,
-0.3931068480014801,
0.7621837854385376,
-0.6293371319770813,
0.043693505227565... | |
}
});
});
```
I would try:
```
$(document).ready(function() {
$("#togglediv").click(function() {
// note: do this first because the :hidden test fails if you
// do it after triggering a slow animation
$("#togglediv").text($("#commentdiv").is(":hidden") ? "Hide" : "Sgiw");
$("#commentdiv").toggle... | [
0.07343365252017975,
-0.28997567296028137,
0.5334703922271729,
-0.15702234208583832,
0.10174673050642014,
0.04850025847554207,
0.37173834443092346,
-0.3470227122306824,
-0.06256420165300369,
-0.654835045337677,
-0.22684656083583832,
0.5747600197792053,
-0.19654925167560577,
-0.161998167634... | |
5px; background-color: yellow; }
#commentdiv { padding: 5px; background-color: #CCC; height: 100px; }
</style>
</head>
<body>
<div id="togglediv">Hide</div>
<div id="commentdiv">thanks for answer. but i have tried this code, it was okay. i want to use toggle("slow") effect. this effect is runing firefox, but ... | [
0.1377023458480835,
-0.14289401471614838,
0.6349140405654907,
-0.2368113398551941,
0.0866447240114212,
-0.0637718141078949,
0.4334770143032074,
-0.2724457085132599,
-0.3726472854614258,
-0.5844837427139282,
-0.21107791364192963,
0.47895634174346924,
-0.5493437051773071,
-0.1417377293109893... | |
When using multivalue parameters in sql reporting services is it more appropriate to implement the list filter using a filter on the dataset itself, the data region control or change the actual query that drives the dataset?
SSRS will support any scenario, so then I ask, is there a reason beyond the obvious of why th... | [
0.41894927620887756,
-0.2835922837257385,
0.11676692217588425,
0.26144126057624817,
-0.3484937250614166,
-0.21146568655967712,
-0.09362874925136566,
-0.34204214811325073,
-0.38481131196022034,
-0.4975487291812897,
0.0713028684258461,
0.5902627110481262,
-0.6528831124305725,
0.0786399394273... | |
may handle this scenario?
You are correct. The way to go is to pass the parameters through to the database engine.
Reporting Services should only be ideally used to render content. The less data that you need to pass back to the client web browser, the faster the report will render.
You may find my answer to a simila... | [
0.45849958062171936,
0.2018342763185501,
0.2661207914352417,
0.25232529640197754,
-0.09938841313123703,
0.001190735143609345,
0.4591923952102661,
-0.2717725932598114,
-0.45618829131126404,
-0.5019270181655884,
0.12408596277236938,
0.5309135317802429,
-0.1975475400686264,
0.1025527641177177... | |
I've got a windows forms map in a WindowsFormsHost, and I need it to resize with the window.
I'm just not sure what event to listen to, to do this. I need the map to only resize once the mouse is up, otherwise it lags out, and tries drawing itself a million times when you resize a window really slowly.
Waiting on a ti... | [
0.2442927062511444,
-0.3481117784976959,
0.30762434005737305,
-0.028871089220046997,
0.20049306750297546,
-0.015651950612664223,
0.13658533990383148,
-0.3608638048171997,
-0.021214185282588005,
-0.829946756362915,
0.0475577674806118,
0.40480223298072815,
-0.12888526916503906,
0.13138051331... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.