text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
<th width="10%">Paid</th>
<th width="10%">Rest</th>
</tr>
</thead>
<tbody>
<tr> | [
0.2680322825908661,
-0.18236730992794037,
0.31569328904151917,
-0.06981729716062546,
0.025570280849933624,
0.4100680649280548,
-0.22549377381801605,
-0.4669520854949951,
-0.12662671506404877,
-0.47406354546546936,
-0.4417600929737091,
0.7459958791732788,
0.3547493815422058,
-0.257055670022... | |
<td>Sign-up tax</td>
<td>100$</td>
<td>25$</td>
<td>75$</td>
</tr>
<tr> | [
0.4240915775299072,
-0.15789636969566345,
0.41499701142311096,
-0.09771250933408737,
0.014963187277317047,
0.21272853016853333,
-0.1378139704465866,
-0.48849058151245117,
0.06568589806556702,
-0.23388904333114624,
-0.25332528352737427,
0.4179268479347229,
-0.08368836343288422,
-0.299567520... | |
<td>Sign-up tax</td>
<td>100$</td>
<td>75$</td>
<td>0$</td>
</tr> | [
0.4462209641933441,
-0.15883883833885193,
0.4565185606479645,
-0.10747426748275757,
0.05060280114412308,
0.16120390594005585,
-0.15670450031757355,
-0.46729981899261475,
0.11420286446809769,
-0.22094397246837616,
-0.251130610704422,
0.4453876316547394,
-0.08760395646095276,
-0.289239406585... | |
</tbody>
</table>
```
The PHP code looks like this:
```
<?php for ($i = 0; $i < count($tax_details); $i++): ?>
<tr>
<td><?php echo $tax_details[$i]['name']; ?></td>
<td><?php echo $tax_details[$i]['value']; ?></td>
<td><?php echo $tax_details[$i]['paid']; ?></td>
<... | [
0.2949221134185791,
0.17938941717147827,
0.13668398559093475,
-0.27562031149864197,
-0.13088960945606232,
0.2110530436038971,
0.24075430631637573,
-0.8151994943618774,
-0.21777908504009247,
-0.016338633373379707,
-0.21103154122829437,
0.09531226754188538,
-0.5576120615005493,
0.12735618650... | |
</tr>
<?php endfor; ?>
```
replace the html with this:
```
<tbody>
<tr>
<td rowspan="2">Sign-up tax</td> <---add rowspan here
<td>100$</td>
<td>25$</td>
<td>75$</td> | [
0.2423696219921112,
-0.07801716774702072,
0.40979546308517456,
-0.10505107045173645,
-0.15506000816822052,
0.3579324185848236,
0.0006296079372987151,
-0.4514267146587372,
-0.06230483204126358,
-0.471031129360199,
-0.09612663835287094,
0.39629581570625305,
-0.22729210555553436,
-0.179881528... | |
</tr>
<tr>
<td>100$</td> <---remove second sign-up tax from here
<td>75$</td>
<td>0$</td> | [
0.39481472969055176,
-0.20641568303108215,
0.5121773481369019,
-0.09816024452447891,
0.04445783793926239,
0.08431436866521835,
-0.12484566867351532,
-0.4912579357624054,
0.16328653693199158,
-0.36804935336112976,
-0.17494310438632965,
0.3976020812988281,
-0.10967569798231125,
-0.2528955638... | |
</tr>
</tbody>
``` | [
0.26951462030410767,
0.617247998714447,
-0.13716259598731995,
-0.0533381812274456,
0.213208869099617,
-0.056930046528577805,
0.26671531796455383,
0.21942093968391418,
-0.23712995648384094,
-0.5949923992156982,
-0.4098435342311859,
0.4732702970504761,
-0.20532485842704773,
0.271961092948913... | |
Suppose you are tasked with writing a web application that must store configuration information in some format. What are the benefits and drawbacks for storing these configuration information in a relational database compared to storing the information in a file? Configuration options may include but not limited to dat... | [
0.10812976956367493,
-0.16703906655311584,
0.13806556165218353,
0.28576064109802246,
0.3205111622810364,
-0.07059512287378311,
-0.10754628479480743,
-0.18446096777915955,
-0.3218977451324463,
-0.7784926891326904,
-0.15986578166484833,
0.5173212289810181,
-0.16120828688144684,
0.05876496061... | |
database credentials so everything can be stored in one place.
Cons for file:
1. Configuration in a load balanced environment is difficult.
2. When adding settings under development, one most remember to move them into the files on every server in production.
3. Configuration must be writable by the webserver if you ... | [
0.21701768040657043,
0.044466737657785416,
0.24683205783367157,
0.26564931869506836,
0.08553759008646011,
-0.3546770513057709,
-0.059692587703466415,
-0.09219621121883392,
-0.2785799503326416,
-0.6025952696800232,
-0.05779511108994484,
0.7637627124786377,
-0.31608259677886963,
0.1495447754... | |
phpMyAdmin or a straight sql client.
3. Control panel development becomes simple.
4. Performance impact can be mitigated by caching configuration in memcached or in a hash in memory.
5. Programmers are more likely to control settings rather than IT people or at least can be controlled through control panel.
Cons for d... | [
-0.08862972259521484,
-0.08077607303857803,
0.5500330924987793,
0.33564242720603943,
-0.1875443458557129,
-0.26405254006385803,
0.39408719539642334,
-0.2582817077636719,
-0.07479918003082275,
-0.5524258613586426,
-0.016308436170220375,
0.5053227543830872,
-0.059151727706193924,
-0.01620775... | |
possible future requirements for providing easy configuration. | [
-0.10762753337621689,
-0.005042809993028641,
0.14881418645381927,
0.21225789189338684,
0.5721625685691833,
0.10474462807178497,
-0.3586674630641937,
-0.029065940529108047,
-0.27244827151298523,
-0.8232565522193909,
-0.30037087202072144,
0.3866746425628662,
0.04844015836715698,
-0.189018160... | |
I have a simple json string which contains a collection of objects
<http://sandapps.com/InAppAds/ads.json.txt>
When I call GetAsync to get the objects, the collection returns 1 element instead of 4 and it's empty:
```
new JsonServiceClient ().GetAsync<List<CrossSell>> (url, Success, Failure);
```
My class is simple... | [
-0.09030747413635254,
0.11354450136423111,
0.6667466163635254,
-0.3463411331176758,
-0.15624158084392548,
0.2944764196872711,
0.4229675233364105,
-0.527313768863678,
-0.11796392500400543,
-0.8761727213859558,
-0.26451727747917175,
0.3623945713043213,
-0.6044862270355225,
0.1016901880502700... | |
public string Copy { get; set; }
public string Device { get; set; }
public string Link { get; set; }
}
```
The JSON assumes a response DTO like:
```
class CrossSellResponse {
List<CrossSell> CrossSells { get; set; }
}
new JsonServiceClient().GetAsync<CrossSellResponse> (url, Success, Failure);
`... | [
-0.013674117624759674,
-0.18789027631282806,
0.6806338429450989,
-0.20580337941646576,
-0.14445635676383972,
0.10353303700685501,
0.39673346281051636,
-0.1699467897415161,
-0.31024831533432007,
-0.7479084134101868,
-0.548374593257904,
0.6268780827522278,
-0.37125787138938904,
0.27375191450... | |
**Background**: I have been trying to display a sentence with Bold and Italic font as well as normal ones.
**Question**: How can I display something like this "Hello, my name is ***Byte***". Notice that Byte is both bold and italic, while other words remains normal.
**I have tried**: I think coreText should be able... | [
0.200773224234581,
0.14381204545497894,
0.4537087380886078,
-0.021903831511735916,
-0.5725034475326538,
0.012133174575865269,
0.3474852442741394,
0.3321652114391327,
-0.3550756275653839,
-0.8598238825798035,
-0.15271496772766113,
0.25976884365081787,
0.06684664636850357,
0.0994086861610412... | |
does not work with my background.
---
**As a reply to Carles Estevadeordal**:
```
UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(10, 360, 300, 40)];
[webView setBackgroundColor: [UIColor clearColor]];
[webView loadHTMLString:[NSString stringWithFormat:@"<html><body style=\"background-color: transpa... | [
0.16568946838378906,
0.39093199372291565,
0.6624699831008911,
-0.2461169809103012,
-0.3098868131637573,
0.38819703459739685,
0.4343021810054779,
-0.4304080903530121,
-0.14922669529914856,
-0.6091468334197998,
0.028399480506777763,
0.508237898349762,
-0.2151145339012146,
-0.1675477027893066... | |
= CTFontCreateWithName((__bridge CFStringRef)boldSystemFont.fontName, boldSystemFont.pointSize, NULL);
NSRange boldRange = [[mutableAttributedString string] rangeOfString:@"Byte" options:NSCaseInsensitiveSearch];
[mutableAttributedString addAttribute:(NSString *)kCTFontAttributeName value:(__bridge id)font ran... | [
-0.19221700727939606,
0.16565297544002533,
0.6986645460128784,
-0.26224571466445923,
-0.036941517144441605,
0.18121372163295746,
0.36154839396476746,
-0.44441476464271545,
-0.15898866951465607,
-0.6187975406646729,
-0.04897957295179367,
0.851168155670166,
-0.0533178336918354,
0.09685301780... | |
i need to do a series of url calls (fetching WMS tiles). i want to use a LIFO stack so the newest url call is the most important. i want to display the tile on the screen now, not a tile that was on the screen 5 seconds ago after a pan.
i can create my own stack from a NSMutableArray, but i'm wondering if a NSOperatio... | [
0.2791163921356201,
-0.0724397674202919,
0.6545573472976685,
-0.020489972084760666,
0.17856496572494507,
-0.006141148507595062,
0.02728409320116043,
-0.03303269296884537,
-0.3753177225589752,
-0.9468427300453186,
-0.01045217365026474,
0.3442646563053131,
-0.013066308572888374,
0.5096102356... | |
of tasks, probably the easiest thing is to treat your queues as though they were immutable and mutate by copying. E.g.
```
- (NSOperationQueue *)addOperation:(NSOperation *)operation toHeadOfQueue:(NSOperationQueue *)queue
{
// suspending a queue prevents it from issuing new operations; it doesn't
// pause any... | [
0.08134942501783371,
-0.28894495964050293,
0.3069114685058594,
-0.033963643014431,
0.3346841335296631,
0.06337610632181168,
0.4192239046096802,
0.005567977204918861,
-0.8407444953918457,
-0.5482308864593506,
-0.3247777223587036,
0.35879454016685486,
-0.5592716932296753,
0.3122721314430237,... | |
operation at the head
[mutatedQueue addOperation:operation];
// copy in all the preexisting operations that haven't yet started
for(NSOperation *operation in [queue operations])
{
if(!operation.isExecuting)
[mutatedQueue addOperation:operation];
}
// the caller should now e... | [
-0.11980268359184265,
-0.26760295033454895,
0.6839481592178345,
-0.30006468296051025,
0.26043951511383057,
0.07569172233343124,
0.25765886902809143,
-0.14240480959415436,
-0.4324716329574585,
-0.4031071662902832,
-0.45887166261672974,
0.6411912441253662,
-0.3352111577987671,
0.289035737514... | |
happen to the old operation queue) doesn't cause it to cancel all operations, but that's not documented behaviour so probably not trustworthy. If you want to be really safe, key-value observe the `operationCount` property on the old queue and release it when it goes to zero. | [
0.115684375166893,
-0.23334819078445435,
0.34405913949012756,
-0.1404954195022583,
0.45585036277770996,
-0.4756808876991272,
0.44974377751350403,
0.004882589913904667,
-0.1868998259305954,
-0.19326937198638916,
-0.4167419970035553,
0.6354628801345825,
-0.46583959460258484,
0.42353230714797... | |
I am looking to do a reveal tab. When a user goes to a fan page tab it will show a specific tab. When the user likes the page it will reveal a registration form. If user is also registered it will reveal another tab(that is basically after it is liked and registered). Is there a way to access if a user has registered o... | [
0.8970163464546204,
-0.125569149851799,
0.42725273966789246,
-0.03774508461356163,
-0.1989561766386032,
-0.47801727056503296,
0.16235235333442688,
0.2527275085449219,
-0.23960377275943756,
-0.637067437171936,
0.16144271194934845,
0.3349813222885132,
0.08851967006921768,
0.49587950110435486... | |
marshalling of tasks, probably the easiest thing is to treat your queues as though they were immutable and mutate by copying. E.g.
```
- (NSOperationQueue *)addOperation:(NSOperation *)operation toHeadOfQueue:(NSOperationQueue *)queue
{
// suspending a queue prevents it from issuing new operations; it doesn't
... | [
0.2234204113483429,
-0.4059751033782959,
0.1156439483165741,
0.22421643137931824,
0.35110563039779663,
0.23139159381389618,
0.08165035396814346,
-0.09248688817024231,
-0.8480015397071838,
-0.3249306082725525,
-0.13678951561450958,
0.24809090793132782,
-0.40202596783638,
0.3664378225803375,... | |
new operation at the head
[mutatedQueue addOperation:operation];
// copy in all the preexisting operations that haven't yet started
for(NSOperation *operation in [queue operations])
{
if(!operation.isExecuting)
[mutatedQueue addOperation:operation];
}
// the caller should n... | [
-0.07001328468322754,
-0.23912294209003448,
0.6766471862792969,
-0.3221438527107239,
0.2901014983654022,
0.05492871627211571,
0.36128032207489014,
-0.1888311505317688,
-0.48990318179130554,
-0.47771283984184265,
-0.47032657265663147,
0.6256433129310608,
-0.34261736273765564,
0.349228829145... | |
will happen to the old operation queue) doesn't cause it to cancel all operations, but that's not documented behaviour so probably not trustworthy. If you want to be really safe, key-value observe the `operationCount` property on the old queue and release it when it goes to zero. | [
0.004885190632194281,
-0.23677030205726624,
0.4269671142101288,
-0.12074391543865204,
0.5249343514442444,
-0.3150980472564697,
0.4290403425693512,
-0.1152399331331253,
-0.17460817098617554,
-0.1607409566640854,
-0.35327965021133423,
0.7019736170768738,
-0.3933982253074646,
0.26313036680221... | |
I'm just starting to learn Grails and Groovy. Did a fresh install of Grails 1.3.8 today and it crawls - I must have something in my environment causing a problem. I ran create-app (following a tutorial), then run-app. Both took quite a while but hey, first time thru. Ran run-app again, took almost 5 minutes, apparently... | [
0.052897751331329346,
0.13907025754451752,
0.4402286112308502,
0.01791669987142086,
-0.038828976452350616,
0.13219451904296875,
0.6014683246612549,
0.3014206290245056,
-0.35172584652900696,
-0.7636789679527283,
-0.019951285794377327,
0.6119062900543213,
-0.004842632450163364,
0.07381428033... | |
to do a whole bunch of manual marshalling of tasks, probably the easiest thing is to treat your queues as though they were immutable and mutate by copying. E.g.
```
- (NSOperationQueue *)addOperation:(NSOperation *)operation toHeadOfQueue:(NSOperationQueue *)queue
{
// suspending a queue prevents it from issuing n... | [
0.26891329884529114,
-0.38325485587120056,
0.3208654820919037,
0.02029602602124214,
0.2962207496166229,
-0.0561448372900486,
0.31795403361320496,
0.12635521590709686,
-0.8025797009468079,
-0.3142101466655731,
-0.36322301626205444,
0.3161129057407379,
-0.5270723104476929,
0.4582166075706482... | |
init];
// add the new operation at the head
[mutatedQueue addOperation:operation];
// copy in all the preexisting operations that haven't yet started
for(NSOperation *operation in [queue operations])
{
if(!operation.isExecuting)
[mutatedQueue addOperation:operation];
}
... | [
-0.24226732552051544,
-0.16991375386714935,
0.6173799633979797,
-0.23015692830085754,
0.2880781888961792,
0.1023789644241333,
0.5030826926231384,
-0.1912691444158554,
-0.23862747848033905,
-0.4597834050655365,
-0.2817998230457306,
0.7251678705215454,
-0.33076009154319763,
0.257872045040130... | |
a queue that is still working (as will happen to the old operation queue) doesn't cause it to cancel all operations, but that's not documented behaviour so probably not trustworthy. If you want to be really safe, key-value observe the `operationCount` property on the old queue and release it when it goes to zero. | [
0.0980243906378746,
-0.3085472583770752,
0.21583569049835205,
-0.04539847373962402,
0.35821592807769775,
-0.3682324290275574,
0.3748420476913452,
-0.02460760995745659,
-0.2768371105194092,
-0.06733628362417221,
-0.2867238521575928,
0.7113417387008667,
-0.4502536952495575,
0.121200919151306... | |
I have a final member data:
```
public final Foo foo;
```
in the constructor, `foo` is initialized as follow:
```
foo = new Foo();
```
Now, unfortunately, Foo's constructor might throw an exception:
```
try {
foo = new Foo();
} catch (Exception e) {
e.printStackTrace();
}
```
But now compiler complains... | [
-0.08549856394529343,
0.12334351241588593,
0.42247292399406433,
-0.28124886751174927,
-0.08429720252752304,
-0.20329493284225464,
0.2211686670780182,
-0.5078142285346985,
-0.05813709646463394,
-0.45022228360176086,
-0.15518124401569366,
0.24627217650413513,
-0.3768632113933563,
0.337184906... | |
{
try {
return new Foo();
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
```
I make no comment about whether it makes sense to continue with construction of your outer object if the inner object's constructor has failed... | [
0.3566381633281708,
0.1316668689250946,
0.21960140764713287,
-0.42681437730789185,
0.1269834190607071,
-0.10856097936630249,
0.6125087141990662,
-0.2052549421787262,
-0.07069219648838043,
-0.4663065969944,
-0.27343595027923584,
0.5815935134887695,
-0.4098179042339325,
0.04114812985062599,
... | |
I have a class that uses priority queue to display 5 strings in ascending order. I understand that to make it in descending order i can use the "collections.reverseOrder()" method. How use this method with the following code?
```
import java.util.*;
public class queue {
public static void main (String[] args) {
... | [
0.16578692197799683,
-0.1023411974310875,
0.1823350191116333,
-0.164048433303833,
-0.10143314301967621,
0.5413140058517456,
0.21817272901535034,
-0.23257257044315338,
-0.46262067556381226,
-0.3980207145214081,
-0.34613505005836487,
0.16663573682308197,
-0.4433756470680237,
0.50330007076263... | |
sQ.add("Fernando");
sQ.add("th");
while (sQ.size() > 0)
System.out.println(sQ.remove());
Collections.reverseOrder(); //I am stuck here...
}
}
```
Try something like this, *before* removing the elements in `sQ`:
```
PriorityQueue<String> reversed =
new PriorityQueue<String... | [
-0.3572990596294403,
-0.04810977354645729,
0.8906328082084656,
-0.22000989317893982,
0.1865234673023224,
0.45607924461364746,
-0.07118399441242218,
-0.344355970621109,
-0.3231290876865387,
-0.48250439763069153,
-0.12651929259300232,
0.45108580589294434,
-0.14354823529720306,
0.268581777811... | |
contains the reversed priority queue
```
Because you're using the natural ordering of `String`, it makes sense to just build another `PriorityQueue` passing as a parameter a new comparator that compares strings but reversing the order (notice the `-` sign in front of the comparison).
**EDIT:**
As has been pointed i... | [
-0.40073174238204956,
-0.24303880333900452,
0.5306169986724854,
-0.06162654981017113,
-0.0482400581240654,
0.3295988440513611,
-0.19560708105564117,
-0.050010502338409424,
-0.5210778117179871,
-0.4045853316783905,
-0.1027681976556778,
0.3055552542209625,
-0.39909395575523376,
0.45104894042... | |
I have a performance issue with calling getInt inside a ResultSetExtractor. GetInt is called 20000 times. One call cost 0.15 ms, the overall cost is 24 seconds, while running inside the profiler. The execution of the SQL statements takes around 8 seconds (access over Primary-Key). I use the mysql driver version 5.1.13,... | [
0.11361236125230789,
0.12447717040777206,
0.6985498666763306,
-0.13535156846046448,
-0.1568395495414734,
0.15090541541576385,
0.6894789934158325,
-0.56075519323349,
0.23153865337371826,
-0.7978043556213379,
-0.026974830776453018,
0.8368918299674988,
-0.22188347578048706,
0.0045631029643118... | |
scheme looks like this
```
CREATE TABLE mutation (
...
leffect_a BIT NOT NULL,
lreliability_a TINYINT UNSIGNED NOT NULL,
...
leffect_y BIT NOT NULL,
lreliability_y TINYINT UNSIGNED NOT NULL,
...
) ENGINE=MyISAM;
```
Edit: Within getInt the methode getIntWithOverflowCheck is called which seems to be expensive.... | [
0.13299468159675598,
-0.22784803807735443,
0.6940582990646362,
-0.3787236511707306,
-0.2837340235710144,
0.005943359341472387,
0.3218337893486023,
-0.8445606231689453,
-0.2630115747451782,
-0.8246349096298218,
0.07758569717407227,
0.6363444924354553,
-0.3714306056499481,
-0.181185036897659... | |
a BOOLEAN
* Make sure you aren't returning any unnecessary columns in your SELECT statement.
* Use [PreparedStatement](http://docs.oracle.com/javase/6/docs/api/java/sql/PreparedStatement.html)
* Avoid scrollable and updatable resultsets (neither are the default) | [
0.0072426567785441875,
-0.034151822328567505,
0.1558283418416977,
-0.047231268137693405,
-0.3305826485157013,
-0.18455056846141815,
0.4202897846698761,
-0.33100536465644836,
-0.12389612197875977,
-0.2848037779331207,
-0.29933738708496094,
0.30402711033821106,
-0.3077656924724579,
-0.085466... | |
I have created an UserControl to implement a simple `ImageButton` as following:
```
<UserControl x:Class="MyApp.Common.Controls.ImageButton"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Name="UC">
<Grid>
<Button ... | [
-0.28189489245414734,
-0.10520293563604355,
0.7964251041412354,
-0.16631807386875153,
-0.26352640986442566,
0.25646641850471497,
-0.303615540266037,
-0.3473271131515503,
-0.18407505750656128,
-0.731784999370575,
-0.08790189772844315,
0.2512894570827484,
-0.09573547542095184,
0.165899217128... | |
Height="{Binding ElementName=UC, Path=ImageHeight}"/>
<TextBlock Text="{Binding ElementName=UC, Path=Text}" />
</StackPanel>
</Button>
</Grid>
```
Here is code-behind of my control:
```
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Medi... | [
-0.00220216391608119,
-0.15281465649604797,
0.9878270626068115,
-0.19439813494682312,
-0.05890011042356491,
0.3404107987880707,
-0.05132320150732994,
-0.47204577922821045,
-0.11418982595205307,
-0.7743798494338989,
-0.13245809078216553,
0.5851508975028992,
-0.08116412907838821,
0.091295972... | |
}
public ImageSource Image
{
get { return (ImageSource)GetValue(ImageProperty); }
set { SetValue(ImageProperty, value); }
}
public static readonly DependencyProperty ImageProperty =
DependencyProperty.Register("Image", typeof(ImageSource), typeof(Ima... | [
-0.02339635044336319,
-0.27931317687034607,
0.6002588868141174,
0.11198911815881729,
0.10392043739557266,
0.22948022186756134,
0.2347576767206192,
-0.1477038562297821,
-0.015948940068483353,
-0.8935081362724304,
-0.40627622604370117,
0.7296403050422668,
-0.5731314420700073,
0.1379483342170... | |
double ImageWidth
{
get { return (double)GetValue(ImageWidthProperty); }
set { SetValue(ImageWidthProperty, value); }
}
public static readonly DependencyProperty ImageWidthProperty =
DependencyProperty.Register("ImageWidth", typeof(double), typeof(ImageButton... | [
0.32737910747528076,
-0.35417938232421875,
0.6426532864570618,
-0.16060985624790192,
-0.21890880167484283,
0.28267109394073486,
0.4370923638343811,
-0.24919980764389038,
0.03955760970711708,
-0.655981183052063,
-0.29784587025642395,
0.7681567072868347,
-0.4926789104938507,
-0.1231164857745... | |
get { return (double)GetValue(ImageHeightProperty); }
set { SetValue(ImageHeightProperty, value); }
}
public static readonly DependencyProperty ImageHeightProperty =
DependencyProperty.Register("ImageHeight", typeof(double), typeof(ImageButton), new UIPropertyMetadata(16d));
... | [
0.16614502668380737,
-0.227161705493927,
0.6894242167472839,
-0.14157570898532867,
-0.0014786807587370276,
0.3359670042991638,
0.4249562919139862,
-0.21662235260009766,
0.05583765730261803,
-0.6965354681015015,
-0.4685038626194,
0.741348385810852,
-0.45294806361198425,
-0.08084795624017715... | |
set { SetValue(TextProperty, value); }
}
public static readonly DependencyProperty TextProperty =
DependencyProperty.Register("Text", typeof(string), typeof(ImageButton), new UIPropertyMetadata(""));
public ICommand Command
{
get { return (ICommand)GetValue(Comm... | [
0.13087108731269836,
-0.35608240962028503,
0.8392593264579773,
0.0026535510551184416,
0.22842562198638916,
0.24164772033691406,
0.1827419400215149,
-0.30996331572532654,
0.02863464131951332,
-0.7173229455947876,
-0.3590008020401001,
0.8317871689796448,
-0.48872601985931396,
0.0842964947223... | |
SetValue(CommandProperty, value); }
}
public static readonly DependencyProperty CommandProperty =
DependencyProperty.Register("Command", typeof(ICommand), typeof(ImageButton));
public object CommandParameter
{
get { return GetValue(CommandParameterProperty); }
... | [
-0.024969182908535004,
-0.4404310882091522,
0.8997125029563904,
0.0581737719476223,
0.12931083142757416,
0.21841657161712646,
0.22999808192253113,
-0.39119377732276917,
-0.06765877455472946,
-0.7724348306655884,
-0.1943851113319397,
0.8756259679794312,
-0.4528639614582062,
-0.0091777127236... | |
public static readonly DependencyProperty CommandParameterProperty =
DependencyProperty.Register("CommandParameter", typeof(object), typeof(ImageButton));
}
}
```
The usage is simple:
```
<cc:ImageButton Command="{Binding SearchCommand}"
Image="/MyApp;component/Images/mag... | [
-0.10954584926366806,
-0.027092795819044113,
0.6809338927268982,
-0.06506301462650299,
0.00921341311186552,
0.12977899610996246,
-0.019225729629397392,
-0.15705502033233643,
-0.37054741382598877,
-0.48559701442718506,
-0.27746304869651794,
0.8222298622131348,
-0.5481781959533691,
0.1066563... | |
/>
```
When the button (bound to DelegateCommand in my ViewModel) get disabled the image is disappear. Otherwise all works as expected.
What could be a problem?
How to make the image show in gray-scale when disabled?
**UPDATE**: here is the image of this strange behavior;
my $parser = XML::LibXML->new();
my $doc = $parser->parse_fh(..... | [
0.1394595354795456,
0.025478823110461235,
0.6785926818847656,
-0.12974439561367035,
0.3739432096481323,
0.03464117646217346,
0.19495420157909393,
-0.13683119416236877,
-0.13655926287174225,
-0.8624053597450256,
-0.4931473135948181,
0.7209868431091309,
-0.08858823776245117,
0.24664720892906... | |
I want to be able to reveal and then populate a certain number of labels. The inefficient way would be to SELECT CASE on the number of labels required and then populate these in turn. I am looking for something like this:
```
For i = 1 to RequiredNumOfLabels
Label & i.visible = true
Label & i.text = DataTable.... | [
0.26633915305137634,
0.06988612562417984,
0.605675458908081,
0.08552886545658112,
0.1605161428451538,
-0.14470042288303375,
-0.044825512915849686,
-0.49807798862457275,
-0.1250241994857788,
-0.6998395323753357,
-0.0844288170337677,
0.5782788395881653,
-0.20488063991069794,
0.19785752892494... | |
lbl.Text = CStr(DataTable.Rows(i).Item(2))
Next
```
I think the line
```
Dim lbl = Controls("lbl" & i)
```
is the problem as after the line is executed, lbl still equals nothing.
The reasoning behind it is that I was trying to create an invoice generator in vb.net and I was hoping that this would be a sim... | [
0.14500896632671356,
-0.1582254022359848,
0.671166718006134,
-0.15390343964099884,
-0.10283243656158447,
-0.2725672423839569,
0.17308448255062103,
-0.20448245108127594,
-0.3255370259284973,
-0.5377150774002075,
-0.08982589840888977,
0.5686140060424805,
-0.42962944507598877,
0.1502624303102... | |
from a list:
```
Dim myLabels As New List(Of Label)
myLabels.Add(Label1)
myLabels.Add(Label2)
```
Then just update them:
```
For i as Integer = 1 to myLabels.Count
myLabels(i - 1).Visible = True
myLabels(i - 1).Text = DataTable.Rows(i).Item(2).ToString
Next
``` | [
-0.020356416702270508,
0.11830291152000427,
0.644782304763794,
-0.13614404201507568,
-0.10165247321128845,
0.09472465515136719,
0.07744863629341125,
-0.228093683719635,
-0.2757144272327423,
-0.8994344472885132,
-0.41827669739723206,
0.4554450511932373,
-0.17010845243930817,
0.3129562437534... | |
I was browsing Symfony's website. I didn't really feel like I need all the functionality the framework offers, but I did like the routing part. It allows you to specify URL pattern like this
```
/some/path/{info}
```
Now for URL like `www.somewebsite.com/app.php/some/path/ANYTHING` it would allow you to send client ... | [
0.5115184783935547,
-0.025700673460960388,
0.24832691252231598,
0.011908291839063168,
-0.4465247690677643,
-0.3262181282043457,
0.2843354046344757,
0.0721793994307518,
-0.2040119171142578,
-0.7321285605430603,
0.013785283081233501,
0.4606426954269409,
-0.08616818487644196,
0.15799908339977... | |
using apache mod\_rewrite you do not need any framework just php. Also this is what in the depth any framework implements | [
0.39988693594932556,
-0.007337633054703474,
0.12009985744953156,
0.3445596694946289,
-0.4961775839328766,
-0.5826904773712158,
0.7343646883964539,
-0.40560731291770935,
-0.13518892228603363,
-0.4630773365497589,
0.16839660704135895,
0.48936429619789124,
-0.4122256338596344,
-0.126249670982... | |
I would like to use app.config transformation as it is done for web.config on [AppHarbor](https://appharbor.com/) background workers. I tried the solution proposed in a previous [question](https://stackoverflow.com/a/5109530/125804) but it doesn't seem to work. Is this possible?
Thanks
Just to state the obvious, you n... | [
0.5789824724197388,
0.15531842410564423,
0.2460215985774994,
0.217289000749588,
0.05129334703087807,
-0.18674494326114655,
0.38228291273117065,
-0.18555524945259094,
-0.26878467202186584,
-0.8291930556297302,
-0.09037606418132782,
0.7131287455558777,
-0.10186058282852173,
0.142878323793411... | |
have to put the logic somewhere. If you are unable to modify the codebehind, compile and deploy then you need to put it on the .ascx. You can trim it up a bit I suppose...
```
<% if (Sitecore.Context.Item["Grades"] != "") { %><h2 class="edu">Timeframe</h2><% } %>
<sc:FieldRenderer runat="server" ID="mhTimeFrame" Field... | [
0.23409460484981537,
-0.0453103706240654,
0.3162057101726532,
0.1051359474658966,
0.3810085356235504,
-0.10339199751615524,
0.2631654441356659,
-0.15349872410297394,
-0.126063272356987,
-0.7495574355125427,
-0.12345383316278458,
0.5004282593727112,
0.1487482190132141,
0.10831721872091293,
... | |
In C, I'm using `fseek` to go back to a position in the file. When I then write to the file with `fprintf`, it overwrites the characters at that location. Is there a way to make fprintf/another function insert, instead of overwrite?
Thanks
The short answer is "no". If you need to insert, you really need to rewrite the... | [
0.09187587350606918,
0.11442126333713531,
-0.0033417504746466875,
-0.19388806819915771,
0.2508203983306885,
-0.03068552352488041,
-0.08443957567214966,
0.18365110456943512,
-0.022444071248173714,
-0.37508660554885864,
-0.3928373456001282,
0.5334175825119019,
-0.1866689771413803,
-0.2931091... | |
How would you suggest to handle svg with QPixmap?
The construct `QPixmap(":/myfile.svg");` then call of `scaled()` does not work. The QPixmap gets pixelised.
Thx.
You should use [SVGRenderer](http://qt-project.org/doc/qt-4.8/qsvgrenderer.html) to render it onto a `QImage`. From there you can convert to a `QPixmap` ... | [
-0.19227658212184906,
-0.5028682947158813,
0.7429236173629761,
0.01231922022998333,
-0.5014888644218445,
-0.012786510400474072,
0.23035435378551483,
-0.5141810774803162,
0.016509084030985832,
-0.7862993478775024,
-0.07044327259063721,
0.4733494520187378,
-0.4436589181423187,
-0.01735134981... | |
I'm querying a single table called PhoneCallNotes. The caller FirstName, LastName and DOB are recorded for each call as well as many other fields including a unique ID for the call (PhoneNoteID) but no unique ID for the caller.
My requirement is to return a list of callers with duplicates removed along with the PhoneN... | [
0.10912071168422699,
0.369230717420578,
0.4598504602909088,
-0.11300591379404068,
-0.07772765308618546,
0.284324049949646,
0.18174616992473602,
-0.3527008593082428,
-0.10331259667873383,
-0.46812403202056885,
0.005591659341007471,
0.27921003103256226,
-0.30031660199165344,
0.27268660068511... | |
by O.CallerFName,O.CallerLName,O.CallerDOB order by Max(O.CreatedOn)
```
Results:
```
John Public 4/4/2001 4/6/12 16:42
Joe Public 4/12/1988 4/6/12 16:52
John Public 1/2/1950 4/6/12 17:01
```
Thanks
Assuming that the set of [`FirstName`, `LastName`, `DateOfBirth`] are unique (#shudder#), I be... | [
-0.30107051134109497,
0.5244241952896118,
0.44173291325569153,
-0.3066546320915222,
-0.002295387675985694,
0.2317323088645935,
0.3114090859889984,
-0.4040169417858124,
-0.1874098926782608,
-0.2517602741718292,
-0.13421368598937988,
0.36378538608551025,
-0.15335698425769806,
0.4009587168693... | |
a particular name/dob combination, where there is not a more-recent row (`b` is null). If you have two rows with the same create time, you'll get duplicate rows, though. | [
0.10807442665100098,
-0.019704600796103477,
-0.016979895532131195,
-0.020401988178491592,
0.06461652368307114,
-0.11869211494922638,
0.21160104870796204,
-0.04523472115397453,
-0.36288532614707947,
-0.8379141688346863,
-0.31166622042655945,
0.08346197754144669,
-0.21130704879760742,
0.1556... | |
I want to be able to handle mod rewrites from within PHP instead of my .htaccess file, this way when I have custom modules that need a new rewrite I don't have to redo the .htaccess file.
I want to mimic the way that WordPress does their .htaccess which is:
```
RewriteEngine On RewriteBase /
RewriteCond %{REQUEST_FIL... | [
-0.11130577325820923,
0.1618935763835907,
0.8309751152992249,
-0.15570765733718872,
0.013329366222023964,
0.24295374751091003,
0.43575212359428406,
-0.6709975004196167,
-0.09031326323747635,
-0.7538857460021973,
-0.039966266602277756,
0.7440516948699951,
-0.2907404601573944,
0.157289281487... | |
replace
```
RewriteRule ^(.+)$ /index.php/$1 [L,QSA]
```
With
```
RewriteRule ^(.+)$ /index.php?path=$1 [L,QSA]
```
Then you have to do similar parsing and everything as modrewrite does, but you can do it yourself using preg\_match on $\_GET['path']. I.e.
```
if (preg_match('/id/([0-9]*)', $_GET['path'], $matche... | [
-0.0073147485964000225,
-0.023297520354390144,
0.8041912317276001,
-0.283199667930603,
0.15671652555465698,
-0.035642120987176895,
0.391257107257843,
-0.7237480282783508,
0.006961659993976355,
-0.49705126881599426,
-0.09067337214946747,
0.7497674226760864,
-0.3709833025932312,
-0.069566406... | |
Im really trying to learn regex so here it goes.
I would really like to get all words in a string which do not have a "/" on either side.
For example, I need to do this to:
"Hello Great /World/"
I need to have the results:
"Hello"
"Great"
is this possible in regex, if so, how do I do it? I think i would like the resu... | [
0.2441791594028473,
0.225821390748024,
0.5229328870773315,
-0.17125511169433594,
-0.15043888986110687,
-0.4057093560695648,
0.6316786408424377,
0.0832318440079689,
0.02575932815670967,
-0.8052048683166504,
-0.1196468248963356,
0.7115328311920166,
-0.08820383250713348,
0.1251002699136734,
... | |
will get you:
```
Hello
Great
am
great
too
``` | [
0.477336585521698,
0.25108256936073303,
0.6032610535621643,
0.07595822215080261,
0.17892372608184814,
-0.10924280434846878,
0.572651207447052,
0.8683179020881653,
-0.06398419290781021,
-0.5726467370986938,
-0.15446820855140686,
0.6584701538085938,
0.23757009208202362,
0.21567271649837494,
... | |
I'm calling a third party's AXIS web service via a .Net solution
Added the Service Reference to my VS Project via following WSDL file (service location has been removed, since it is a restricted usage)
```
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
name="PremiumCharging"
targetNamespace="http://... | [
0.5641442537307739,
-0.31703126430511475,
0.9049229621887207,
-0.12248659133911133,
-0.3711991310119629,
0.15145359933376312,
0.2718020975589752,
-0.17731037735939026,
-0.09948496520519257,
-0.6013504266738892,
0.13671059906482697,
0.7618600726127625,
0.10334184020757675,
0.189413636922836... | |
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="UserInfo">
<xsd:sequence>
<xsd:element name="aggregatorId" type="xsd:int"/>
<xsd:element name="pwd" type="xsd:string"/>
<xsd:element name="version" type="xsd:string"/>
</xsd:sequence>
</xsd:com... | [
-0.24776311218738556,
-0.12017539143562317,
0.41453835368156433,
-0.24157258868217468,
-0.46775296330451965,
-0.16145110130310059,
-0.2443600445985794,
-0.3222382068634033,
-0.36264124512672424,
-0.6434467434883118,
-0.007962158881127834,
0.3524318337440491,
-0.21891017258167267,
0.1563252... | |
<xsd:element name="errorDescription" type="xsd:string"/>
<xsd:element name="transactionId" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="chargeSubscriberResponse">
<wsdl:part name="chargeSubscriberReturn" type="pmg:StatusInfo"/>
... | [
-0.19029633700847626,
-0.3484928011894226,
0.7899892926216125,
0.07580430060625076,
-0.07728126645088196,
-0.10014573484659195,
-0.2313707321882248,
-0.5113233923912048,
-0.36483606696128845,
-0.48152852058410645,
-0.11369001120328903,
0.7780632972717285,
0.041221413761377335,
0.0162472371... | |
<wsdl:operation name="chargeSubscriber">
<wsdl:input message="tns:chargeSubscriberRequest"/>
<wsdl:output message="tns:chargeSubscriberResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PremiumChargingBinding" type="tns:PremiumChargingPortType">
<soap:binding style="rpc" transpor... | [
0.17784300446510315,
-0.1782899796962738,
0.877497136592865,
-0.163030207157135,
-0.226421058177948,
-0.01791643165051937,
-0.13213105499744415,
-0.881327211856842,
-0.20121940970420837,
-0.36109626293182373,
-0.15542232990264893,
0.7662150859832764,
-0.0780993103981018,
-0.060847491025924... | |
</wsdl:binding>
<wsdl:service name="PremiumCharging">
<wsdl:port binding="tns:PremiumChargingBinding" name="PremiumChargingPort">
<soap:address location="...location removed..."/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
```
I am able to generate a request and receive a response (captured vi... | [
0.04035217687487602,
-0.32653355598449707,
0.9323587417602539,
-0.09691864252090454,
-0.45995524525642395,
0.032099269330501556,
0.2213922142982483,
-0.8377947211265564,
-0.31104210019111633,
-0.502191424369812,
0.009813537821173668,
0.8041674494743347,
-0.09517472237348557,
-0.15563879907... | |
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1:StatusInfo" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://types.premiumcharging.verisign.com">
<errorCode href="#id1"/>
<errorDescription xsi:type="soapenc:string... | [
0.024511506780982018,
-0.0702105313539505,
0.4727785289287567,
0.05506465584039688,
-0.5522108674049377,
0.18116533756256104,
0.4200825095176697,
-0.705204427242279,
-0.179006427526474,
-0.6329307556152344,
0.09435884654521942,
0.6219793558120728,
-0.3389955163002014,
-0.09093504399061203,... | |
@SixtoSeaz suggested SO Answer:
[SO Answer](https://stackoverflow.com/questions/30171/why-wont-net-deserialize-my-primitive-array-from-a-web-service?answertab=votes#tab-top)
And in the method "AfterReceiveReply" of the Client Message Inspector I changed the SOAP response by assigning the InnerXml on each node that re... | [
0.10775814950466156,
-0.07223662734031677,
0.7219285368919373,
-0.18734611570835114,
-0.1477700173854828,
0.13750244677066803,
0.5800063610076904,
-0.4990488886833191,
-0.10906105488538742,
-0.7127180099487305,
-0.11018000543117523,
0.6920444965362549,
-0.3521120250225067,
0.35588350892066... | |
endpoint, EndpointDispatcher endpointDispatcher)
{
}
public void Validate(ServiceEndpoint endpoint)
{
}
}
public class MyMessageInspector : IClientMessageInspector
{
public void AfterReceiveReply(ref Message reply, object correlationState)
{
XmlDocument doc = new XmlDocument();
... | [
-0.24915562570095062,
-0.16099946200847626,
0.8964512944221497,
-0.0657014399766922,
-0.009668172337114811,
0.14141829311847687,
0.20513103902339935,
-0.47598975896835327,
-0.13325586915016174,
-0.5810642242431641,
-0.566658079624176,
0.27321723103523254,
-0.22604422271251678,
0.3720846772... | |
FixNodes(items, multiRefs);
MemoryStream ms = new MemoryStream();
XmlWriter writer = XmlWriter.Create(ms);
doc.WriteTo(writer);
writer.Flush();
ms.Position = 0;
XmlReader reader = XmlReader.Create(ms);
reply = Message.CreateMessage(reader, int.MaxValue, reply.V... | [
-0.3244902193546295,
-0.6004842519760132,
0.7288749814033508,
0.054502859711647034,
0.22647497057914734,
0.4751802682876587,
0.18119850754737854,
-0.1043829470872879,
-0.1818045824766159,
-0.5736433267593384,
-0.29452425241470337,
0.527271032333374,
-0.44482138752937317,
-0.010010355152189... | |
return null;
}
private static void InspectNodes(XmlElement element, List<XmlElement> items, Dictionary<string, XmlElement> multiRefs)
{
string val = element.GetAttribute("href");
if (val != null && val.StartsWith("#id"))
items.Add(element);
else if (element.Name == "mult... | [
-0.2119726836681366,
-0.11587460339069366,
0.34964519739151,
-0.056707486510276794,
0.053039614111185074,
0.06623014062643051,
0.425708144903183,
-0.5575132966041565,
-0.19536885619163513,
-0.582543134689331,
-0.3819832503795624,
0.3342536687850952,
-0.49032333493232727,
0.2935117483139038... | |
in element.ChildNodes)
{
XmlElement child = node as XmlElement;
if (child != null)
InspectNodes(child, items, multiRefs);
}
}
private static void FixNodes(List<XmlElement> items, Dictionary<string, XmlElement> multiRefs)
{
// Reverse order so... | [
-0.2613510489463806,
-0.23119740188121796,
0.3318301737308502,
0.04471850395202637,
0.3467622697353363,
0.3490332067012787,
-0.07581561803817749,
-0.3662329316139221,
-0.25095948576927185,
-0.5338094234466553,
-0.38653847575187683,
0.10734132677316666,
-0.48505738377571106,
0.1926487386226... | |
id refs into one single element. This is only a solution in relation to the WSDL definition.
for (int x = items.Count - 1; x >= 0; x--)
{
XmlElement element = items[x];
string href = element.GetAttribute("href");
if (String.IsNullOrEmpty(href)) | [
-0.11664347350597382,
-0.26529571413993835,
0.609078049659729,
-0.006479676812887192,
-0.10165826976299286,
0.09644394367933273,
0.0025695906952023506,
-0.8619450330734253,
-0.07216204702854156,
-0.5669506788253784,
-0.24082563817501068,
0.425144761800766,
-0.24990962445735931,
0.143128246... | |
continue;
if (href.StartsWith("#"))
href = href.Remove(0, 1);
XmlElement multiRef = multiRefs[href];
if (multiRef == null)
continue;
element.RemoveAttribute("href"); | [
-0.05700564756989479,
-0.27978119254112244,
0.6651214957237244,
-0.1618179976940155,
0.33954527974128723,
0.018584037199616432,
0.48962903022766113,
-0.4277377724647522,
-0.21509982645511627,
-0.18009936809539795,
-0.8040220141410828,
0.2647506296634674,
-0.32612094283103943,
0.41697889566... | |
element.InnerXml = multiRef.InnerXml;
multiRef.ParentNode.RemoveChild(multiRef as XmlNode);
}
}
}
```
And then assign the Behavior to the EndPoint (Service Reference is PMGReference)
```
MyBehavior behavior = new MyBehavior();
PMGReference.PremiumChargingPortTypeClient client = new PMGRefer... | [
-0.06286603212356567,
-0.18348751962184906,
0.8976879715919495,
-0.08922240883111954,
0.2178935408592224,
0.14765144884586334,
0.43835684657096863,
-0.49711382389068604,
-0.04058302193880081,
-0.44513362646102905,
-0.3105473518371582,
0.8918865323066711,
-0.22491426765918732,
0.23170106112... | |
I'm trying to create a draggable graph similar to <http://raphaeljs.com/graffle.html> (works in both 1.5.2 and 2.1), but I want to include text in the boxes.
I added the text using the suggestion in another question: [How can I combine objects in the Raphael javascript library?](https://stackoverflow.com/questions/367... | [
0.2701845169067383,
-0.17558553814888,
0.15062318742275238,
-0.3497292995452881,
-0.3145620822906494,
0.2772757112979889,
0.1383078247308731,
-0.7704464197158813,
-0.24050113558769226,
-0.7094801664352417,
0.16315904259681702,
0.32472512125968933,
-0.5399947166442871,
-0.4262692332267761,
... | |
y2: 101045.00025112627
```
Am I missing something about the change from v1.5 to v2, or is this odd BBox a bug? Any ideas how I can fix this issue?
Thanks!
Well, it looks like there was an attempt to replace the native method `getBBox` with a custom implementation, in Raphael.
The reasons behind this might be that t... | [
0.8744033575057983,
0.45700526237487793,
0.278727650642395,
-0.13538219034671783,
-0.39433300495147705,
0.0031860603485256433,
0.11432945728302002,
0.07426127791404724,
-0.3269340991973877,
-0.5238385200500488,
-0.005074101500213146,
0.406644344329834,
-0.5144952535629272,
0.05583043769001... | |
its flaws.
You can use the native getBBox in Raphael 2.x with this code:
```
var bb1 = obj1.node.getBBox(),
bb2 = obj2.node.getBBox(),
```
I tested it and looks good: <http://jsfiddle.net/ScBtZ/2/> | [
0.18382371962070465,
0.3342612385749817,
0.14757554233074188,
-0.40732723474502563,
-0.19379441440105438,
0.08376054465770721,
0.46491488814353943,
-0.24648317694664001,
-0.011164008639752865,
-0.4909883737564087,
0.2583199441432953,
0.5055834054946899,
-0.4225209057331085,
-0.224279344081... | |
Hey guys i am having an issue with an assignment I am working on.
The code is as follows:
```
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cmath>
#include <cstdio>
#include <cstring>
using namespace std;
class payroll
{
private:
char empnum[10];
char empfirstname[150];
char emplas... | [
0.21356847882270813,
0.4637487232685089,
0.5470570921897888,
-0.10344516485929489,
-0.03267596289515495,
0.4115317165851593,
0.14164742827415466,
0.20090053975582123,
-0.47812384366989136,
-0.4160209000110626,
-0.4914870858192444,
0.5551899671554565,
-0.3866366147994995,
-0.384068816900253... | |
int empsalaryei;
int empsalaryfedtax;
int empsalarycpp;
int empsalarynet;
int empsalarygross;
public:
void addrec(void);
void modrec(void);
void viewrec(void);
void exit(void);
};
payroll rec;
payroll emp;
ifstream inFile1;
ifstream inFile2;
bool check = false;
int main()
{
syste... | [
0.2168944627046585,
-0.12284230440855026,
0.5491016507148743,
-0.23525887727737427,
0.11498341709375381,
0.4047996699810028,
0.3906756341457367,
0.00044594579958356917,
-0.12455438077449799,
-0.35320979356765747,
-0.37716013193130493,
0.5972510576248169,
-0.4129401445388794,
0.102754272520... | |
record\n";
cout<<"0. Exit\n";
cout<<"Please choose an item: ";
if (check == true)
{
system("CLS");
ch=0;
}
else
cin>>ch; | [
-0.06747109442949295,
-0.055429428815841675,
0.5431280732154846,
-0.0012020834255963564,
0.5782138705253601,
0.0023523601703345776,
-0.10750871896743774,
-0.0475403293967247,
-0.22902683913707733,
-0.3734796643257141,
-0.5031293034553528,
0.28416702151298523,
-0.29466894268989563,
0.549220... | |
switch(ch)
{
case '1':
emp.addrec();
break;
case '2':
emp.modrec();
break; | [
-0.04570735991001129,
-0.1566297560930252,
0.17407235503196716,
-0.18829874694347382,
0.3608552813529968,
0.014196211472153664,
0.2300649881362915,
-0.4480586647987366,
-0.3027236759662628,
-0.2753698527812958,
-0.631310760974884,
0.6431594491004944,
-0.34567177295684814,
0.119656234979629... | |
case '3':
emp.viewrec();
break;
case '0':
emp.exit();
return 0;
} | [
-0.524574875831604,
0.10459605604410172,
0.3598442077636719,
-0.19746017456054688,
0.2118518352508545,
0.36461809277534485,
0.6102014780044556,
-0.5144550800323486,
-0.29315024614334106,
-0.16733816266059875,
-0.5455349683761597,
0.4606819152832031,
-0.36606845259666443,
0.0708153620362281... | |
}while(ch !=0);
return 0;
}
void open_employee_info() //function to open employee data file
{
string filename1 = "employee-details.dat"; //define which file to open
inFile1.open(filename1.c_str()); //open our payroll file
if(inFile1.fail()) | [
0.33416029810905457,
-0.13259446620941162,
0.16493479907512665,
-0.08138523250818253,
0.28501683473587036,
0.20054645836353302,
0.12884336709976196,
-0.1259555071592331,
-0.1341610997915268,
-0.5967854857444763,
-0.14336790144443512,
0.5629621744155884,
-0.23545989394187927,
0.081803560256... | |
//if our file open fails....
{
cout << "\nSorry the file was not opened successfully"<< "\n Please check that the file does exist or create it" << endl;
exit(1);
}
cout << "\n The file was opened successfully" << endl;
}
void open_payroll_info() //function to open payroll sala... | [
0.2629275321960449,
0.15579724311828613,
0.3895067572593689,
0.07307270169258118,
0.4524039030075073,
-0.03444511070847511,
0.08239386230707169,
-0.09209565073251724,
-0.15927132964134216,
-0.407456636428833,
-0.0820126011967659,
0.5802035331726074,
-0.042932603508234024,
0.144091680645942... | |
file
{
string filename2 = "payroll-info.dat"; //define file name
inFile2.open(filename2.c_str());
if(inFile2.fail())
{
cout << "\nSorry the file was not opened successfully"<< "\n Please check that the file does exist or create it" << endl;
exit(1);
}
cout << "\n The fi... | [
0.3845069408416748,
-0.05350903049111366,
0.2015543431043625,
-0.14524972438812256,
0.19081592559814453,
0.18966668844223022,
-0.024439046159386635,
-0.33732518553733826,
-0.4869168698787689,
-0.4649638533592224,
-0.15964828431606293,
0.509417712688446,
-0.23908701539039612,
-0.03246657922... | |
char userinputadd = ' ';
cout << "\nPlease Enter the Employee number: ";
gets(rec.empnum);
cout << "\nPlease Enter the Employee's First Name: ";
gets(rec.empfirstname);
cout << "\nPlease Enter the Employee's Last Name: ";
gets(rec.emplastname);
cout << "\nPlease Enter the Employee's Date of... | [
-0.22758647799491882,
-0.08243704587221146,
0.6020456552505493,
-0.20663808286190033,
0.5746489763259888,
0.7101903557777405,
0.06271695345640182,
0.14808306097984314,
-0.4081727862358093,
-0.36505281925201416,
-0.4995630085468292,
0.045798804610967636,
-0.021790986880660057,
0.12715119123... | |
gets(rec.empphone);
cout << "\nPlease Enter the Employee's Address: ";
gets(rec.empstreet);
cout << "\nPlease Enter the Employee's City: ";
gets(rec.empcity);
cout << "\nPlease Enter the Employee's Province: ";
gets(rec.empprovince);
cout << "\nPlease Enter the Employee's Country: ";
get... | [
0.03482538089156151,
-0.3840586245059967,
0.9767970442771912,
0.19627881050109863,
0.308261901140213,
0.2931511402130127,
0.270333856344223,
-0.1965542733669281,
-0.6386452317237854,
-0.08155502378940582,
-0.5317813754081726,
-0.2094980776309967,
-0.2801615595817566,
0.03209751844406128,
... | |
you like to return to the main menu?(y), else the program will exit: ";
cin>>userinputadd;
if (userinputadd =='y' || userinputadd =='Y')
main();
else
exit();
}
void payroll::modrec(void) //Record Modification
{
system("CLS");
int empmodnum=0;
check = false;
char use... | [
0.01596149057149887,
-0.11351001262664795,
0.5752975344657898,
-0.02456086128950119,
0.6440854072570801,
0.0571834072470665,
0.24298816919326782,
0.05672434717416763,
-0.45138052105903625,
-0.5219340324401855,
-0.2591707408428192,
0.7894428968429565,
-0.19209875166416168,
0.481562256813049... | |
cin>>empmodnum;
cout<<"Would you like to return to the main menu?(y), else the program will exit: ";
cin>>userinputmod;
if (userinputmod =='y' || userinputmod =='Y')
main();
else
exit();
}
void payroll::viewrec(void) //Record viewing
{
system("CLS");
check = false;
... | [
0.06833226978778839,
-0.12104389071464539,
0.6286910772323608,
0.00806351937353611,
0.4414379298686981,
0.16902029514312744,
0.11696001142263412,
-0.004934656899422407,
-0.4814879298210144,
-0.60146564245224,
-0.21529965102672577,
0.6478736400604248,
-0.23864038288593292,
0.294353157281875... | |
cin>>userinputview;
if (userinputview =='y' || userinputview =='Y')
main();
else
exit();
}
void payroll::exit(void)
{
inFile1.close();
inFile2.close();
check = true;
}
```
So on the front menu if you hit 1 to add a record you will see it skips the first cin statement being employ... | [
0.3461584448814392,
-0.2520115375518799,
0.5222434997558594,
-0.06107141450047493,
0.32569125294685364,
-0.05548758804798126,
0.18440227210521698,
0.15286436676979065,
-0.32208243012428284,
-0.8542954325675964,
-0.1135442778468132,
0.4672679007053375,
-0.3283826410770416,
0.566120624542236... | |
When I start an audio output process with `AudioQueueStart(out.queue, nil)`, the output callback only fires 3 times (which is the number of allocated buffers).
Here is my Output callback code:
```
static void AQOutputCallback(void* aqr,
AudioQueueRef outQ,
Aud... | [
0.04027824476361275,
0.2076563984155655,
0.5459484457969666,
-0.6094864010810852,
0.05444658175110817,
0.09329329431056976,
0.5952009558677673,
-0.45983922481536865,
0.18634705245494843,
-0.3832607567310333,
-0.3753703534603119,
0.889805018901825,
-0.3325485587120056,
0.33778345584869385,
... | |
NSLog(@"Out");
// Check if AudioQueue is stopped
if (!aqc->run) {
NSLog(@"Stopped");
return;
}
// Processing data
// Check enqueue error
int err = AudioQueueEnqueueBuffer(outQ, outQB, 0, NULL);
if (err != noErr) NSLog(@"OutputCallback AudioQueueEnqueueBuffer() %d ", err);
NSLog(@"Enqueued");
... | [
-0.2814231514930725,
0.18092207610607147,
0.7090420722961426,
-0.3863199055194855,
0.2751119136810303,
-0.04104382544755936,
0.654877781867981,
-0.31901034712791443,
0.00864403322339058,
-0.48916757106781006,
-0.34599757194519043,
0.9959545731544495,
-0.37682610750198364,
0.207299694418907... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.