text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
existed for months. Also they're empty. And `.git/remotes` doesn't exist at all, although I'm not sure that it should. You may need to tell git which branches to fetch from origin. In the `.git/config` file for this repo, under the `[remote "origin"]` section, there should be a line like `fetch = ...`. This tells git w...
[ 0.1776835173368454, -0.3539269268512726, 0.4127514362335205, 0.15404821932315826, 0.12228445708751678, 0.08383607119321823, 0.07309514284133911, 0.4360038936138153, -0.6790382862091064, -0.2535058557987213, 0.08240494132041931, 0.14382953941822052, 0.11111967265605927, 0.6196234822273254, ...
add it to match the example, which is the standard "track all branches and call them origin/*branch* locally" option set up by `git clone`. See the [git pro book](http://git-scm.com/book/en/v2/Git-Internals-The-Refspec) for a good description of what's going on.
[ 0.45378854870796204, -0.32253313064575195, 0.17884409427642822, 0.07598847150802612, 0.32227835059165955, -0.3241444230079651, 0.0690089538693428, 0.44082939624786377, -0.279094398021698, -0.24465833604335785, -0.21951614320278168, 0.15778842568397522, -0.18399496376514435, 0.2660131156444...
I'm not a MySQL expert and am having problem with this... So, I have a forum board database. There is an outdated code in one of the table that I need to replace. I'm trying to use this: ``` Update ibf_posts Set post = replace(post, '<div width="95%" style="margin:8px 26px 4px 26px"><a href="javascript:void(0);" o...
[ 0.38423192501068115, 0.22609181702136993, 0.17416000366210938, -0.08971947431564331, -0.09273187816143036, -0.18701483309268951, 0.4899514615535736, -0.3814293146133423, 0.07042502611875534, -0.5695779323577881, 0.03494906798005104, 0.7265273332595825, 0.008437971584498882, 0.2045975327491...
that corresponds to your MySQL server version for the right syntax to use near 'WHERE post LIKE '%<div width="95%" style="margin:8px 26px 4px 26px"><a href="ja' at line 1 ``` It's odd, since I tried on my localhost it's working fine. But when I tried in my live server, it doesn't work. My MySQL version (on live ser...
[ -0.1949179321527481, 0.11718840152025223, 0.4920337498188019, -0.14595811069011688, -0.20900605618953705, -0.09052270650863647, 0.6907822489738464, 0.47046416997909546, 0.015283710323274136, -0.6445974111557007, -0.2687850892543793, 0.47179239988327026, -0.20792613923549652, 0.105346217751...
As I'm sure you all know, Internet Explorer can handle simple gradients. Here is a snippet from Twitter Bootstrap, for example: ``` filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0); ``` However, I've seen some people use two CSS rules (one for IE < 8 ...
[ -0.09500345587730408, -0.29782190918922424, 0.5191118121147156, -0.13711228966712952, -0.22696496546268463, -0.015586425550282001, 0.19654560089111328, -0.06752283871173859, -0.22867895662784576, -0.8515181541442871, -0.10483741760253906, 0.29984351992607117, -0.4629212021827698, -0.210248...
a synonym for **filter** in IE8 Standards mode. My suggestion: Use CSS3Pie -- <http://css3pie.com/> This is a JavaScript library for IE6, IE7 and IE8 that patches in support for several CSS3 features, including gradients. Yes, you can use the horrible IE-specific `filter` styles if you want, but CSS3Pie allows you t...
[ 0.3974975049495697, -0.2032337188720703, 0.1158243864774704, -0.08842034637928009, -0.3207055330276489, -0.15595011413097382, 0.17556235194206238, 0.06930559873580933, -0.13994839787483215, -0.9737710356712341, 0.11842050403356552, 0.21758605539798737, -0.8008944392204285, -0.0079671852290...
to ensure IE8 compatibility. [EDITED] Why did they change it? Because when they released IE8, Microsoft made a big point of trying to be "standards compliant". For a browser to be standard-compliant, it should use a vendor prefix for any CSS property it supports that is not a finalized W3C standard. So by adding the ...
[ 0.42647096514701843, 0.008162123151123524, 0.30744749307632446, 0.017038652673363686, -0.1693137139081955, -0.2895466089248657, 0.18843629956245422, 0.3348030745983124, -0.13374601304531097, -0.3205164968967438, -0.1594027280807495, 0.13803163170814514, -0.7303083539009094, 0.2277365773916...
some time ago with Firefox 3.6 where it was dropping all styles following a `filter` style that rotated an element - took ages to work out what was happening). The fact that Microsoft retained backward compatibility with the original `filter` syntax, was largely a matter of pragmatism. MS couldn't afford to break all ...
[ 0.2604629099369049, -0.0042209927923977375, 0.6058732867240906, -0.19005087018013, -0.27075132727622986, -0.30837196111679077, 0.21559682488441467, -0.029734276235103607, -0.1328832358121872, -0.4795128405094147, -0.07180793583393097, 0.40182244777679443, -0.8023351430892944, 0.23207084834...
fell swoop, but the implications given at the release of IE8 were sufficient for it to become recommended practice to provide both syntaxes in your stylesheet. At the time when IE8 was released, XHTML was the new flavor of the month, and writing code that validated perfectly was top of the list for a lot of developers...
[ 0.04245014116168022, -0.1862448751926422, 0.7046138644218445, 0.09004040062427521, -0.73050457239151, -0.3632442057132721, 0.3596540689468384, 0.17048414051532745, 0.0005461915279738605, -0.023921724408864975, 0.25832346081733704, 0.32696256041526794, -0.18878430128097534, -0.2732508480548...
valid CSS. As good ideas go, this one didn't really work out because of course people had to keep using the old syntax anyway, but the intent was good. It's worth pointing out that other proprietary styles were given the same treatment. For example, you can use `-ms-behavior` in IE8 instead of the old `behavior` style...
[ 0.46874088048934937, 0.12600035965442657, 0.4508160948753357, 0.1437835991382599, -0.2699834704399109, -0.5649401545524597, 0.1567593663930893, -0.060012634843587875, -0.28673604130744934, -0.5959559082984924, -0.006861743982881308, 0.3297365605831146, -0.314798504114151, 0.078206740319728...
standardized and browsers start supporting it, there will be an explicit clash between the two syntaxes.
[ 0.36876577138900757, 0.007814668118953705, 0.2594048082828522, 0.03465577960014343, -0.2017168253660202, -0.5009645819664001, -0.07652685046195984, 0.23223662376403809, 0.024303272366523743, -0.9589539170265198, -0.3149012327194214, 0.2610381245613098, -0.2576424777507782, -0.0833401679992...
In database.yml you define all the settings. How can I access those settings from ruby? I've looked in `App::Application::config`, but can't find it there. Also, I remember people were able to configure database settings without yaml, does anyone know how? ```rb Rails.configuration.database_configuration ``` This wil...
[ 0.33602941036224365, 0.30606579780578613, 0.31490570306777954, 0.05530422553420067, 0.10282664746046066, -0.11796596646308899, 0.1079857125878334, 0.2405945509672165, -0.160853773355484, -0.8049819469451904, 0.372903048992157, 0.5963389873504639, -0.4424344003200531, 0.39284491539001465, ...
In the script below, the reset button acts also like a submit button. Where could the problem be? Thanks. **HTML** ``` <input type="image" name="submit" value=" " src="image.png"> <input type="image" name="reset" value=" " src="reset.png"> ``` Thanks for your time. Inputs of type image always act like submit bu...
[ -0.06723085045814514, -0.13877180218696594, 0.2958270311355591, 0.1936478465795517, -0.22730375826358795, 0.04548647627234459, 0.3027650713920593, -0.21503642201423645, -0.32428741455078125, -0.8082289099693298, -0.12157082557678223, 0.8341749906539917, -0.14555926620960236, -0.17930339276...
browsers without JavaScript (they get the default reset button) as well as with JavaScript enabled.
[ 0.0467555932700634, 0.042112722992897034, 0.13697607815265656, 0.07974359393119812, -0.0292340237647295, -0.2742235064506531, 0.7268822193145752, 0.5300665497779846, -0.2287624031305313, -1.3074326515197754, -0.653884768486023, 0.29217052459716797, -0.3820604085922241, -0.14311905205249786...
This is what I have so far: <http://jsfiddle.net/beCVL/5/> This is how I'm trying to override the default cloneNode: Object.defineProperty(Object.prototype, "cloneNode", { get: cloneNode2, set: cloneNode2 }); but it's not working, so, I think Object.prototype doesn't have cloneNode, but Element.prototype doesn't ei...
[ 0.08775773644447327, -0.12493724375963211, 0.1747218370437622, -0.20783096551895142, 0.038291897624731064, -0.07871395349502563, 0.17550480365753174, -0.5023759603500366, -0.1078706830739975, -0.7690960764884949, 0.16416864097118378, 0.6072205305099487, -0.35911133885383606, 0.172980919480...
Build: **JobB** > > > [**x**] Block until the triggered projects finish > their builds > > > Projects to Build: **JobC** > > > [**x**] Block until the triggered projects finish > their builds Do the same on Job2. > Add a lock that is shared between the two Jobs 1 and 2. This way when Job 1 and Job 2 are trigge...
[ 0.5330995917320251, 0.1339370459318161, 0.4262073040008545, -0.32988083362579346, -0.011918353848159313, 0.1875561773777008, 0.2676328420639038, -0.5235432982444763, -0.35603657364845276, -0.6898341178894043, -0.22414422035217285, 0.40429431200027466, -0.1724032312631607, 0.020706284791231...
the triggered job or continue regardless of the result. ``` Fail this build step if the triggered build is worse or equal to Mark this build as failure if the triggered build is worse or equal to Mark this build as unstable if the triggered build is worse or equal to ```
[ 0.15523463487625122, 0.00611093221232295, 0.3097535967826843, -0.2621613144874573, 0.07825535535812378, 0.23240786790847778, 0.8470019698143005, -0.12802867591381073, -0.042961373925209045, -0.1798592060804367, -0.6004387140274048, 0.9079620242118835, -0.2923027276992798, -0.25186681747436...
I'm currently working on the back-end of ACM-like public programming contest system. In such system, any user can submit a code source, which will be compiled and run automatically (which means, no human-eye pre-moderation is performed) in attempt to solve some computational problem. Back-end is a GNU/Linux dedicated ...
[ 0.5019804835319519, 0.14253434538841248, 0.08937536925077438, 0.40094658732414246, 0.12146198749542236, -0.05320309102535248, -0.24214290082454681, -0.047409020364284515, 0.07260888069868088, -0.3998655676841736, -0.010493718087673187, 0.5142064094543457, 0.08355563879013062, 0.13241329789...
for the sources. That's because problems require platform-independent solutions, while enabling system calls for insecure source is a potential security breach. Such sources may be successfully placed in the FS, even compiled, but never run. I also want to be notified whenever source containing system calls was sent. ...
[ 0.22228161990642548, 0.40116554498672485, 0.21461032330989838, 0.19644278287887573, 0.24149109423160553, -0.1803164780139923, 0.24485449492931366, 0.03845188021659851, -0.1597350835800171, -0.5051936507225037, -0.46207499504089355, 0.8241201639175415, -0.2737864851951599, -0.30031806230545...
is encountered. Platform-dependent, compiler-dependent, language-independent solution (if we place checker "far enough"). Compatibility may also be lost. In fact, I dislike this alternative most. * **Run-time checker** - whenever system call is invoked from the process, terminate this process and report. This solution ...
[ 0.058344531804323196, 0.20605206489562988, 0.2623128592967987, 0.0761791318655014, 0.04421902075409889, -0.38163599371910095, 0.42551758885383606, 0.03713215887546539, -0.11310265213251114, -0.5165368318557739, -0.33024048805236816, 0.7523558735847473, -0.3624614477157593, 0.01605816185474...
lightweight GNU utility. I tried to Google, but Google disliked me today. mode 1 `seccomp` allows a process to limit itself to exactly four syscalls: `read`, `write`, `sigreturn`, and `_exit`. This can be used to severely sandbox code, as [seccomp-nurse](http://chdir.org/~nico/seccomp-nurse/) does. [mode 2 `seccomp`]...
[ -0.12631934881210327, -0.26392850279808044, 0.35404375195503235, -0.11144304275512695, -0.29366111755371094, -0.2962484359741211, -0.053844425827264786, -0.45458099246025085, -0.2411077320575714, -0.4574756324291229, -0.41897645592689514, 0.8253248929977417, -0.7504844665527344, -0.3208629...
Working in the latest Unity3d 3.5 if it matters. If I have a set of classes: ``` Class A extends MonoBehaviour Class B extends Class A Class C1 extends Class B Class C2 extends Class B ``` And I have a GameObject that has C2 as a component. Will `GetComponent.<A>()` return the C2 component? Well, I haven't tried a ...
[ -0.04284216836094856, -0.1473860889673233, 0.31643253564834595, -0.22600214183330536, 0.03511962667107582, -0.2377845197916031, 0.09937392920255661, -0.2509613335132599, -0.169008269906044, -0.5976197123527527, -0.08976640552282333, 0.8649815917015076, -0.4588407278060913, -0.2079712897539...
The following program doesn't build in VS11 beta, gcc 4.5, or clang 3.1 ``` #include <thread> #include <memory> int main() { std::unique_ptr<int> p; std::thread th([](std::unique_ptr<int>) { },std::move(p)); th.join(); } ``` This is because the argument type is not copyable, but the implementation ...
[ -0.057060446590185165, 0.2754603922367096, 0.5359746217727661, -0.16956759989261627, 0.13623028993606567, -0.19756345450878143, 0.17245197296142578, -0.23811468482017517, -0.24275577068328857, -0.35591423511505127, -0.13166658580303192, 0.2888006567955017, -0.3109220266342163, 0.3550363779...
expression. In this case I think expression works out to something like: ``` template <class T> typename std::decay<T>::type decay_copy(T&& v) { return std::forward<T>(v); } std::unique_ptr<int> p; auto f = [](std::unique_ptr<int>) {}; decay_copy(f)(decay_copy(std::move(p))); ``` And I don't think this is suppose...
[ 0.16000954806804657, 0.11785898357629776, 0.5395890474319458, -0.059906017035245895, 0.17482005059719086, -0.07580912858247757, 0.3434443771839142, -0.3951737582683563, -0.03310595080256462, -0.42829540371894836, -0.09335114806890488, 0.770566463470459, -0.4754687547683716, -0.042653031647...
*Requires*: **`F`** and each **`Ti`** in **`Args`** shall satisfy the `MoveConstructible` requirements. `INVOKE (DECAY_-COPY ( std::forward<F>(f)), DECAY_COPY (std::forward<Args>(args))...)` (20.8.2) shall be a valid expression. > > > *Effects*: Constructs an object of type thread. The new thread of execution execute...
[ 0.14802634716033936, 0.23182091116905212, 0.6192421317100525, -0.2935323417186737, 0.20507670938968658, 0.025879088789224625, 0.38980528712272644, -0.6406951546669006, -0.15774796903133392, -0.4688721299171448, -0.4165325462818146, 0.526524007320404, -0.4831872880458832, 0.1321885436773300...
(DECAY_COPY ( std::forward<F>(f)), DECAY_COPY (std::forward<Args>(args))...)` terminates with an uncaught exception, std::terminate shall be called. So yes, this should work. If it doesn't, then that's a bug in your implementation. Do note that any parameter movement/copying will happen on the new thread. You're pass...
[ 0.2422366738319397, 0.3147401511669159, 0.5222619771957397, -0.2560671269893646, 0.35616371035575867, -0.2883938252925873, 0.42344599962234497, -0.13118457794189453, -0.3023212254047394, -0.5240845680236816, -0.246623232960701, 0.5181280970573425, -0.5279637575149536, 0.5838652849197388, ...
Lets say you have a web app related Android app that requires the user to login in order to use it. The user logs in, in the Login screen activity and then proceeds to other activities. Each time the user starts an Activity, the app checks his login credentials again (The credentials are stored in a central database so...
[ 0.8724689483642578, -0.041332319378852844, 0.6513460874557495, 0.2814623713493347, 0.44959908723831177, -0.23634645342826843, 0.3380172848701477, 0.21650347113609314, -0.36365044116973877, -0.4613772928714752, -0.12501193583011627, 0.5377357006072998, -0.4640158414840698, 0.193749278783798...
now kick the user back to the login screen Activity. But since there is already a stack of Activities that the app has created as the user used the app, how do you get the login screen. Do you kill/destroy all Activities until you reach the login screen Activity (which should be the Activity at the bottom of the stac...
[ 0.8150268793106079, -0.22887849807739258, 0.40188878774642944, 0.16963325440883636, -0.11718049645423889, -0.36873170733451843, 0.4910871386528015, -0.10366739332675934, -0.6442610025405884, -0.4416404366493225, -0.1051708310842514, 0.6963266134262085, -0.5282959938049316, -0.0944417566061...
(lets say he got his credentials reinstated), if the Activity is now the only one in the stack, pressing the back button will take him out of the App, as opposed to going back to what he was doing before having his credentials revoked. What is the best approach to this? My personal choice is to set up all of your activ...
[ 0.5628440976142883, 0.09211265295743942, 0.3477938771247864, 0.1565616875886917, 0.4770655930042267, -0.4223761260509491, 0.4483317732810974, -0.0855194628238678, -0.6013626456260681, -0.27170252799987793, -0.20850279927253723, 0.5685722827911377, -0.23389680683612823, -0.10461968928575516...
have credentials (either because they don't have them or they've been revoked) then I `startActivityForResult()` the login activity. If the LoginActivity returns a valid user, all is well. If the user is a valid but different one from who was logged in before, I take them to my root activity with `FLAG_ACTIVITY_CLEAR_T...
[ 0.33468514680862427, 0.19176755845546722, 1.0418275594711304, -0.17773744463920593, 0.37701064348220825, -0.5920285582542419, 0.5263442397117615, -0.06955979019403458, -0.3522062599658966, -0.5935477614402771, -0.4775688946247101, 0.4863271117210388, 0.09716467559337616, -0.146535262465477...
I am new to Rails and Ruby. On my view, I have 2 radio buttons that ask if the person is a resident of the US. If they are, a state select is shown. If they aren't, a country select is shown. I am trying to validate that a state was selected, if the person is a resident of the US. How can I create a validation and ac...
[ 0.1431599110364914, 0.2714166045188904, 0.09895914047956467, 0.006296609994024038, -0.02521464042365551, -0.2926277816295624, 0.36642542481422424, -0.3217463493347168, 0.05374249815940857, -0.8561339378356934, 0.1451403796672821, 0.4863422214984894, -0.19670714437961578, 0.1931031644344329...
:resident attr_accessible :campaign_id, :first_name, :last_name, :user_attributes, :addresses_attributes, :resident validates :first_name, :presence =>
[ -0.2995794415473938, 0.13493679463863373, 0.5229008793830872, 0.11536615341901779, -0.0855855643749237, 0.054508838802576065, 0.06598709523677826, -0.014831922017037868, -0.11646704375743866, -0.555770218372345, -0.3831412196159363, 0.29683446884155273, -0.3461526334285736, -0.064116209745...
true validates :last_name, :presence => true validates_presence_of :resident, :message => "must be selected" end ``` These are the relevant parameters being sent: ``` "resident"=>"true", "addresses_attributes"=>{"0"=>{"country_code"=>"", "state"=>""}} ``` +1 to @VelLes for the help in pointing me in the rig...
[ 0.28214552998542786, 0.25229865312576294, 0.9611040353775024, 0.04087942838668823, 0.16469131410121918, -0.2711159586906433, 0.652815043926239, -0.6448351740837097, 0.32948634028434753, -0.33690106868743896, -0.02030690759420395, 0.8260703086853027, -0.07390403002500534, 0.1998690366744995...
You can do `self.resident == 'false'` or convert to a boolean and add a new self.resident? method. I chose the latter. The boolean conversion came from [this blog post](http://jeffgardner.org/2011/08/04/rails-string-to-boolean-method/), add to a file in config/initializers ``` class String def to_bool return tr...
[ -0.15579715371131897, 0.2271093875169754, 0.4120759963989258, -0.2806131839752197, 0.14447438716888428, 0.1217775046825409, 0.5866427421569824, -0.45772188901901245, -0.0020648734644055367, -0.5519822239875793, -0.002516398439183831, 0.6196211576461792, -0.31088143587112427, 0.170634895563...
self.addresses[0].errors.add(:state, "must be selected") end end ``` Please let me know if there is a better 'rails' way to do this!
[ 0.14636091887950897, 0.11432762444019318, 0.021041611209511757, 0.36238133907318115, 0.005486465059220791, -0.2711274027824402, 0.48026010394096375, -0.08536406606435776, 0.34378600120544434, -0.7493982911109924, 0.1912100464105606, 0.4662875831127167, -0.0928771123290062, 0.05632087960839...
I have an array made of unlimited number of objects. These objects have the same structure. If I console.log my whole array I get something like this: [object], [object], [object], ecc... Whenever I push a new object inside of the array I could also implement a counter, or I could just use a normal for loop to count ...
[ 0.32118678092956543, -0.1622297465801239, 0.29030802845954895, 0.13768309354782104, -0.1830916553735733, 0.04055806249380112, 0.032625116407871246, -0.24626711010932922, -0.4419354200363159, -0.3716682493686676, 0.2101181596517563, 0.2502606213092804, -0.3226052522659302, 0.380621135234832...
`type(3,)` returns the int type, while ``` t = 3, type(t) ``` returns the tuple type. Why? Inside the parentheses that form the function call operator, the comma is *not* for building tuples, but for separating arguments. Thus, `type(3, )` is equivalent to `type(3)`. An additional comma at the end of the argument l...
[ -0.07769156247377396, 0.1947999894618988, 0.5468986630439758, -0.2783496379852295, -0.2980269193649292, 0.1840590238571167, 0.4287712275981903, -0.36699602007865906, 0.08402072638273239, -0.37021827697753906, -0.5138432383537292, 0.6072486639022827, -0.492146372795105, -0.08712824434041977...
New to CakePHP, so be gentle... I'm trying to loop through a table to display all the read-only fields (labels and values). In my edit function, I get the table ``` $this->set('invoice', $this->Invoice->read(null, $id)); ``` In my view, I want to loop through the entire table schema and output the field names and ...
[ 0.09001350402832031, -0.09636695683002472, 0.7080373764038086, -0.2713033854961395, -0.08248841762542725, -0.049502868205308914, 0.019891560077667236, -0.11754032224416733, -0.23584625124931335, -0.6683003306388855, -0.1286688894033432, 0.5059269666671753, -0.21130940318107605, 0.247777596...
sense. Thanks for your time. You could loop through the schema and output it like that: ``` // assumes $result contains model data $schema = $this->Model->schema(); foreach ($schema as $field => $attrs) { echo $result['Model'][$field]; } ```
[ 0.1982979029417038, -0.011275648139417171, 0.42596641182899475, -0.010309070348739624, -0.03739345446228981, -0.2154524177312851, 0.4817880392074585, -0.5289811491966248, -0.06424558907747269, -0.6500908136367798, 0.11491873115301132, 0.7388831377029419, -0.6383805274963379, -0.04308307170...
I've got a DIV #alerts\_wrapper on my page that is being refreshed every 5 seconds like this: ``` refresh_alerts = setInterval(function () { $('#leftside div#alerts_wrapper').load('staffhome.php #alerts_container' ); }, 5000); ``` I've got a max-height on the div set to 200px, and scrolling to auto. How can I s...
[ 0.24852685630321503, -0.027509624138474464, 1.1907278299331665, -0.1554817110300064, -0.12916254997253418, 0.11710088700056076, 0.4631284475326538, -0.1523292511701584, -0.2252064049243927, -0.6747797131538391, -0.04043147340416908, 0.9864585995674133, -0.0034392711240798235, -0.1016889140...
isScrolling = true; }); refreshTimer = setInterval(refreshContent, 5000); function refreshContent() { if (!isScrolling) { $('#scrollingDiv').prepend('Latest Content <br />');//test code //$('#leftside div#alerts_wrapper').load('staffhome.php #alerts_container'); ...
[ -0.34461379051208496, -0.24388262629508972, 1.2414745092391968, -0.0748707577586174, -0.04227517917752266, 0.2173549383878708, 0.24603678286075592, -0.49766090512275696, -0.06953968852758408, -0.4243583083152771, -0.3670913875102997, 0.5381531119346619, -0.20576460659503937, -0.22587399184...
on div scroll event will do the trick. See [**DEMO**](http://jsfiddle.net/skram/hRreU/5/) ``` var isScrolling = false; var refreshTimer = null; $(function() { $('#scrollingDiv').on('scroll', function() { isScrolling = true; if (refreshTimer != null) { clearInterval(refreshTimer); ...
[ -0.08693340420722961, -0.2697712182998657, 1.0412726402282715, -0.04176947474479675, -0.2542198598384857, 0.11341942846775055, 0.13811653852462769, -0.3109797537326813, 0.13089120388031006, -0.6459735035896301, -0.04853136092424393, 0.9060423374176025, -0.29108020663261414, -0.040795549750...
isScrolling = false; if (refreshTimer == null) { refreshTimer = setInterval(refreshContent, 5000); } }, 500); //initialize timer refreshTimer = setInterval(refreshContent, 5000); function refreshContent() { if (!isScrolling) { $('#scrollingDiv').pre...
[ -0.20154786109924316, -0.3804551959037781, 1.1887258291244507, -0.3224557340145111, 0.04561742767691612, 0.47795340418815613, 0.194138765335083, -0.31982913613319397, -0.047107994556427, -0.6719186305999756, -0.38220739364624023, 0.7848377227783203, -0.05996298789978027, 0.1320287585258484...
//$('#leftside div#alerts_wrapper').load('staffhome.php #alerts_container'); } } }); ```
[ 0.1679074913263321, -0.11675263941287994, 0.6061966419219971, -0.2633829712867737, 0.2796657979488373, -0.14291715621948242, 0.2577447295188904, -0.06559404730796814, -0.19155827164649963, -0.39167866110801697, -0.34258130192756653, 0.630274772644043, -0.41287970542907715, 0.07199290394783...
I've run into an rather irritating problem in java. I have a program that runs a bunch of simulations in java, there is a lot of data generated and it's all displayed on "graph" objects. I created a component called "Graphs" that displays a long list of these "graph" objects using a GroupLayout and placed it inside a J...
[ 0.11271337419748306, 0.22198426723480225, 0.4173695147037506, -0.04335646703839302, -0.3192063868045807, 0.2475796341896057, 0.2137419581413269, -0.11486005038022995, -0.6773983240127563, -0.4237443506717682, 0.1554730385541916, 0.26206040382385254, -0.3658813238143921, 0.38722309470176697...
bit number). It would seem that component size is being stored as a 16 bit signed number and not a 32 bit integer as I first thought. The question I have is thus. Is there any way of changing the way java stores the size of components, and therefore create components larger than this size? If not what would the best...
[ 0.13406135141849518, 0.12707306444644928, 0.4266743063926697, 0.19016587734222412, -0.1897774338722229, 0.012652185745537281, 0.05343697592616081, -0.14925286173820496, -0.6132800579071045, -0.5935519933700562, 0.1143190935254097, 0.4286789000034332, -0.20159463584423065, 0.267998635768890...
advance. Chris. See the related question, [Why doesn't Java support unsigned ints?](https://stackoverflow.com/questions/430346/why-doesnt-java-support-unsigned-ints). You can work around the limitation by displaying your graphs in a `JList` or `JTable`. The `JList`/`JTable` will only render the cells that are current...
[ 0.257207453250885, -0.1265219748020172, 0.38707995414733887, 0.033394698053598404, -0.25050756335258484, -0.05577397346496582, 0.20389105379581451, -0.3357628881931305, -0.18354253470897675, -0.7885470390319824, -0.15852850675582886, 0.32852354645729065, -0.3396768271923065, -0.20481701195...
I want my table to be with width of 80% of the screen. The table has one row and 4 columns. each cell contains one image. The problem is that the pictures are too big - I want that their width will be determined by the table width evenly (each cell will get 20% of the screen) and such that each picture height will ...
[ 0.11548219621181488, 0.3381132483482361, 0.5079972743988037, -0.13981589674949646, -0.017330478876829147, 0.4593786895275116, -0.05932033807039261, -0.5981698632240295, -0.4747604429721832, -0.7237334847450256, 0.07057832181453705, 0.5007182359695435, -0.18257124722003937, 0.09783276915550...
you put some kind of width on the TD. The browser should be able to calculate it since it's a table, but if for some reason you changed to a list markup or something else, you would need a defined width.
[ 0.6438772678375244, -0.4108530580997467, 0.34338656067848206, 0.20899955928325653, -0.28856638073921204, 0.03984445706009865, -0.08394232392311096, -0.13540133833885193, -0.2343681901693344, -0.5977044701576233, 0.1818547546863556, 0.43057799339294434, 0.039192382246255875, 0.0033552765380...
At the moment I am trying to create a setup where page content is loaded within the main to avoid having to refresh the page for every link. I am using jQuery load as follows for every link that is clicked so that the link is loaded into the `#main`. (Obviously it won't be all links when complete.) Pages visited dire...
[ 0.3288715183734894, -0.011039710603654385, 0.6467518210411072, -0.10528332740068436, -0.3153345286846161, -0.35048094391822815, 0.43067437410354614, -0.043961912393569946, -0.2399742603302002, -0.7286930084228516, 0.0026416273321956396, 0.7086576223373413, -0.36446455121040344, 0.063304178...
$("#main").load($(this).attr("href"), function(){ $("#main, #footer").fadeIn('slow'); }); return false }); ``` The issue that causes this problem with `.load()` is when the file you are including contains `<script></script>` tags. These interfere with the Javascript and it can't cope causing the pa...
[ 0.2314506471157074, 0.07399572432041168, 0.5005117654800415, -0.3767921030521393, 0.07540367543697357, -0.25480949878692627, 0.39124688506126404, -0.260562926530838, -0.03341040015220642, -0.6532255411148071, -0.46771040558815, 0.6979787349700928, -0.6400611400604248, 0.05741286650300026, ...
I have a table A with IP addresses (ipNumeric) stored as unsigned ints and a table B with subnets (subnetNumeric): ``` INET_NTOA(ipNumeric) = 192.168.0.1 INET_NTOA(subnetNumeric) = 192.168.0.0 ``` I'd like to check if this IP is a member of a subnet. The subnets are Class A, B and C. Is this possible to do in reas...
[ -0.025050677359104156, 0.059759724885225296, 0.37699106335639954, -0.11850105226039886, -0.11086101830005646, 0.09893208742141724, -0.033590104430913925, -0.2794609069824219, -0.13774549961090088, -0.7509574890136719, 0.08315286040306091, 0.31578919291496277, -0.3173123300075531, 0.2091780...
the subnet mask with the IP address you have; if the IP is inside the subnet, the result should be equal to the subnet address -- standard networking stuff. So we end up with: ``` SELECT (-1 << 8) & INET_ATON("192.168.0.1") = INET_ATON("192.168.0.0"); ``` **Update:** Yes, it is necessary to know the network class *o...
[ -0.08783140778541565, -0.33533942699432373, 0.32249999046325684, 0.12074091285467148, -0.024188566952943802, 0.01785888895392418, 0.4099382758140564, -0.28500890731811523, -0.24389781057834625, -0.7703130841255188, -0.07769416272640228, 0.6186146140098572, -0.3053428530693054, 0.0960077494...
mask, then the query can be written as ``` SELECT (-1 << (33 - INSTR(BIN(INET_ATON("255.255.255.0")), "0"))) & INET_ATON("192.168.0.1") = INET_ATON("192.168.0.0"); ```
[ -0.27091726660728455, -0.39705637097358704, 0.5112685561180115, -0.12038623541593552, -0.10725519061088562, 0.34449341893196106, 0.46374061703681946, -0.4737683832645416, 0.16843171417713165, -0.4944441616535187, -0.4331226050853729, 0.8778935670852661, -0.4442133903503418, -0.146779403090...
I am trying to find the makers of products who only make laptops and not PC's ``` Relations: Product(maker, model, type) Laptop(Model, price, speed, ram, hd, screen) PC(model, price, speed, ram, hd) Printer(model,price, color, price) ``` What I have tried ``` (SELECT maker, type FROM product WHERE type = 'laptop...
[ 0.0352032445371151, 0.2993371784687042, 0.39886000752449036, -0.19338257610797882, -0.16765998303890228, 0.5539919137954712, -0.1473761796951294, -0.14974333345890045, -0.0800008624792099, -0.7040808200836182, -0.07013772428035736, 0.6660094261169434, -0.2941419184207916, 0.179341286420822...
I was wondering if it were at all possible to have checkable icons in an action bar in ICS? Not with a check, but with a `android:stateChecked` property to play around with. I want it so when the user clicks on the icon, they enter a certain mode (and the background of the icon would be a bright color to let them know ...
[ 0.2932048439979553, -0.05788915976881981, 0.18859732151031494, 0.13815361261367798, 0.14849965274333954, -0.1630135029554367, 0.2759243845939636, 0.03562943637371063, -0.36911842226982117, -0.5282525420188904, -0.18741032481193542, 0.5080634951591492, -0.3117064833641052, 0.003312646411359...
items cannot appear in main menus, they can only be in submenus. However, is there a way to still get the behavior of a checkable? It's easy enough to have a `boolean` like `isInModeA`, but is there a way to programmatically change the background/icon of an Action bar item? There is a way to programmatically change the...
[ 0.014171614311635494, -0.3579409122467041, 0.5806939005851746, 0.0614185556769371, -0.21936462819576263, 0.1325802356004715, 0.1997668594121933, -0.3442384898662567, -0.4092633128166199, -0.42906251549720764, -0.408119797706604, 0.4231451451778412, -0.3560934066772461, -0.01952080801129341...
I'm creating a client-server relationship whereby a single client will be connected to an arbitrary number of servers using persistent TCP connections. The actual number of servers is as-of-yet undetermined, but the design goal is to shoot for 1000. I found an example using direct Java NIO that nearly completely match...
[ 0.3234620988368988, -0.046048689633607864, 0.3891763389110565, 0.05693951994180679, -0.028176669031381607, 0.07483240962028503, -0.12892213463783264, -0.30784016847610474, -0.4408876299858093, -0.6372273564338684, 0.37248530983924866, 0.2681037485599518, -0.26930829882621765, 0.25647181272...
higher level socket framework like Netty, than direct Java NIO. Unfortunately, I have not been able to determine how Netty would handle a case like this. That is, the examples and discussions I've found all tend to center around the server side, with accepting scores of concurrent connections. But what about doing thi...
[ 0.4078434109687805, -0.13264891505241394, -0.09835512191057205, 0.12295345962047577, -0.46611645817756653, 0.07571990042924881, -0.2729846239089966, -0.019668040797114372, -0.28802457451820374, -0.7076355218887329, 0.32759401202201843, 0.5164174437522888, -0.19207046926021576, 0.1808913052...
that is used to register Channels to it. The number of used workers is configurable and by default 2 \* cpu-count.
[ 0.28431329131126404, 0.029845155775547028, 0.21922822296619415, 0.1447090208530426, 0.28922414779663086, 0.20368438959121704, 0.010926373302936554, -0.08723615109920502, -0.30816739797592163, -0.729197084903717, -0.02248413860797882, 0.39456525444984436, -0.35069629549980164, 0.23869030177...
I have a table that is populated from a SQL database. Most of the data entered will have an ABN which I can use to look up email and name. Some data doesn't have an ABN, and only has a UID. I don't want to have to display the UID in the table since its unnecessary 98% of the time, so I want to use an xsl:when to change...
[ 0.28023359179496765, 0.2939568758010864, 0.39465993642807007, -0.013899761252105236, 0.17482835054397583, -0.06384829431772232, -0.14754794538021088, -0.08189041167497635, 0.047969210892915726, -0.8661453127861023, -0.016281072050333023, 0.24081440269947052, -0.22597485780715942, 0.2195779...
<row batchid="0" courseid="10101" createdon="04/03/2012 01:08PM" datecompleted="1:08 PM" datecompletedDateValue="1333483680000" lastupdatebyabn="999999" lastupdatebyuid="tsmith" lastupdateon="04/03/2012 01:08PM" num="2" respondentabn="999999" respondentemail="tsmith@test.com" respondentid="1" respondentname="Thomas Smi...
[ -0.16894613206386566, 0.34747907519340515, 0.5276270508766174, -0.11505164206027985, -0.06604714691638947, 0.07239636778831482, 0.5445553660392761, -0.6703981161117554, -0.13023510575294495, -0.44902753829956055, -0.20925261080265045, 0.1298961639404297, 0.0683799758553505, -0.002486569806...
<label datafield="@respondentname"></label> </xsl:otherwise></xsl:choose></td> ``` How can I fix this? Edit: So after talking to my boss, he said for one I'd need an loop in there for this to work right, but that I really shouldn't be doing this in the .xsl anyways. I modified my sql that is serving up the dat...
[ 0.20926563441753387, 0.2714989185333252, 0.4745688736438751, -0.23004500567913055, 0.12806595861911774, -0.26966553926467896, 0.5290032029151917, -0.3246733248233795, -0.2744472324848175, -0.5343431830406189, -0.15908919274806976, 0.6191138029098511, -0.603020966053009, 0.14391307532787323...
I have a function like this: ``` def foo(bar): ... ``` Now `bar` can either be a Django record or the slug pointing to a record. I need this flexibility so that I can call this function when I have the actual record at hand or am calling this from a more generic function that only has bar available as a string (...
[ 0.373063325881958, 0.3140774965286255, 0.3058601915836334, -0.35867592692375183, -0.10253306478261948, -0.27890652418136597, -0.1209467425942421, -0.161797434091568, -0.28961771726608276, -0.40191495418548584, 0.21144546568393707, 0.6632619500160217, -0.449044793844223, 0.19369807839393616...
... ``` But this doesn't seem elegant *at all*. If I can I'd like to avoid using isinstance. You are by definition not using Duck Typing. Duck Typing says that "if it talks like a duck and looks like a duck, it's a duck." Duck Typing means you can pass two objects of completely different classes to the method and h...
[ 0.18078391253948212, -0.08127949386835098, 0.0934678316116333, 0.2389150857925415, -0.07427965849637985, -0.046496469527482986, 0.05355016142129898, 0.11119411885738373, -0.3116648495197296, -0.8205528855323792, 0.015493480488657951, 0.298787921667099, -0.2596936821937561, -0.1820932477712...
case you want to pass an object sometimes and a string that can be used to look up said object other times. This has nothing to do with Duck Typing. isinstance is the right way to solve this. In this case this is the clearest way to solve the problem, anything else is going to be more complicated, harder to understand...
[ 0.0938684344291687, -0.30703797936439514, 0.0693158283829689, 0.2742006778717041, -0.39980825781822205, -0.27616065740585327, 0.20866134762763977, 0.17885836958885193, -0.22115452587604523, -0.6769717335700989, 0.21935448050498962, 0.4790082275867462, -0.22112564742565155, -0.3320025801658...
but duck typing doesn't apply in this case. In short. Just use isinstance. For your case it's the right (pythonic) way to do it.
[ 0.2756445109844208, -0.032086122781038284, 0.014326290227472782, 0.07606847584247589, 0.22194904088974, -0.2166844755411148, 0.05276401713490486, 0.6398581266403198, -0.2837810814380646, -0.395111083984375, 0.10264948010444641, 0.5472506284713745, -0.4568648040294647, -0.5451640486717224, ...
How can a PHP script check if a value is in an array? I want it to check if a password input is equal to those in an array. e.g. if $input == "pass1" or "pass2" or "pass3" The PHP function for checking if a variable is in an array is [`in_array`](http://php.net/manual/en/function.in-array.php). Like this: ``` if (in...
[ 0.04033922404050827, -0.03627294674515724, 0.09644714742898941, -0.042391352355480194, -0.2905488908290863, -0.20561879873275757, 0.3105337917804718, -0.2815200388431549, 0.1413695067167282, -0.4038452208042145, 0.15821126103401184, 0.4228927493095398, -0.22302350401878357, -0.250069290399...
I am beginning to define classes in JavaScript, and I have a lot of troubles with the keyword `this`. Here is an example of what I want to do: ``` function MyMap() { this.map = new google.maps.Map(....); google.maps.event.addListener(this.map, 'idle', function() { this.mapIdle(); // PROBLEM: "thi...
[ -0.16678471863269806, -0.05262096971273422, 0.39516812562942505, -0.3305266201496124, 0.17088812589645386, -0.04240677133202553, 0.27520951628685, -0.10980818420648575, -0.1801791489124298, -0.9158508777618408, -0.1423475295305252, 0.607824444770813, -0.33778470754623413, 0.090796202421188...
$.ajax({ success: function() { this.map.clearInfoWindows(); // PROBLEM: "this" undefined } });
[ -0.4294218122959137, -0.16857083141803741, 0.16861529648303986, -0.0765230804681778, 0.08277161419391632, -0.38773858547210693, 0.5109055042266846, 0.07768294960260391, 0.0010908062104135752, -0.6323232650756836, -0.4104611575603485, 0.7807935476303101, -0.3785329759120941, -0.128759622573...
}); }); } } ``` As you can see in the comments, `this` won't work here, because it is used **inside a closure**. I have started using [workarounds](https://stackoverflow.com/questions/229080/class-methods-as-event-handlers-in-javascript) like: ``` var that = this; google.maps.event.addListener(this.map,...
[ -0.15476135909557343, -0.07752251625061035, 0.21596969664096832, -0.2882727384567261, -0.007520980201661587, -0.15468144416809082, 0.19384384155273438, -0.1543172150850296, -0.30181562900543213, -0.5101096630096436, -0.14046503603458405, 0.7130839824676514, -0.5418111681938171, -0.03302815...
best and most correct way to do that?** The easiest way is to define a `self` variable (or `that`, if you don't mind a non-semantic variable name) as you already mentioned: ``` function MyMap() { var self = this; // in nested functions use self for the current instance of MyMap } ``` Noting that you have to d...
[ -0.1541251689195633, 0.1176707074046135, 0.1628604531288147, 0.09512069821357727, 0.11117430776357651, -0.2009720504283905, 0.20118404924869537, -0.2273404598236084, -0.04396770894527435, -0.8495445251464844, 0.084366574883461, 0.5242371559143066, -0.18665137887001038, -0.06924845278263092...
work for IE <= 8. The question you linked to about defining a callback around your callback is to solve a different problem, i.e., setting up an appropriate closure structure to allow functions that are nested inside a loop to have access to the appropriate loop counter value(s). That has nothing to do with the `this`...
[ 0.23829534649848938, -0.16760793328285217, -0.020953785628080368, -0.1940774768590927, -0.15846604108810425, -0.30071231722831726, 0.3312215209007263, -0.2628970146179199, 0.007484023459255695, -0.4866545796394348, -0.17296835780143738, 0.43779537081718445, -0.5361294746398926, -0.17486460...
I have a slideshow that I am triggering with a call from a link. The slideshow is working well. I am having problems stopping AND clearing the slideshow. I have a temporary link that I am calling the stopShow function that is stopping the show, but is not clearing it so I can then redisplay other items. ``` // JavaScr...
[ 0.1608055979013443, 0.04682324081659317, 0.982765793800354, -0.14315156638622284, -0.08635493367910385, -0.12577667832374573, 0.2948719561100006, -0.3805204927921295, -0.23593875765800476, -0.6780710816383362, -0.31511983275413513, 0.673174262046814, -0.38037770986557007, 0.325993001461029...
var stopShow = 0; var slideTImer; function slideShow() { if (!stopShow){ showCanvas = document.getElementById('Canvas1'); showCanvasCtx = showCanvas.getContext('2d'); //clear canvas showCanvasCtx.clearRect(0,0,showCanvasCtx.canvas.width,showCanvasCtx.can...
[ 0.06670311093330383, -0.291948527097702, 0.9494062662124634, -0.3111221492290497, -0.2394000142812729, 0.13647763431072235, 0.20301243662834167, -0.5087018013000488, -0.3016511797904968, -0.5395601391792297, -0.34224873781204224, 0.5757921934127808, -0.3702273368835449, 0.01769933663308620...
img.setAttribute('width','500'); img.setAttribute('height','400'); switchImage(); //start the animation slideTimer = setInterval(switchImage,3000); } } function switchImage() { //set img element source property to images in slideshow
[ 0.060070741921663284, -0.4476523697376251, 0.7030029892921448, -0.04935699328780174, 0.033187057822942734, 0.27698633074760437, -0.09461603313684464, -0.5618816018104553, -0.13066057860851288, -0.6947029829025269, -0.24350351095199585, 0.4905566871166229, -0.40926671028137207, 0.0483473166...
img.setAttribute('src',imagePaths[currentImage++]); //if past the last image, loop if (currentImage >= imagePaths.length) currentImage = 0; //fade into image by 10th of full saturation showCanvasCtx.globalAlpha = 0.1; revealTimer = setInterval...
[ 0.09040309488773346, -0.6387715935707092, 1.0405192375183105, -0.10481224209070206, 0.12628044188022614, -0.14021897315979004, 0.294375479221344, -0.15377570688724518, 0.011181621812283993, -0.6199769973754883, -0.23797239363193512, 0.18809767067432404, -0.11345452070236206, 0.306196838617...
} function revealImage() { showCanvasCtx.save(); showCanvasCtx.drawImage(img,100,0,500,400); showCanvasCtx.globalAlpha += 0.1; if (showCanvasCtx.globalAlpha >= 1.0) clearInterval(revealTimer); showCanvasCtx.restore(); } function stopSlideShow() { //alert('st...
[ -0.19581887125968933, -0.3611840009689331, 0.8769565224647522, -0.42429691553115845, 0.0931212529540062, 0.03215485066175461, 0.46581143140792847, -0.11731035262346268, 0.16673246026039124, -0.3912647068500519, -0.42521071434020996, 0.6220967769622803, -0.34926068782806396, 0.4025086760520...
showCanvas = document.getElementById('Canvas1'); showCanvasCtx = showCanvas.getContext('2d'); //clear canvas showCanvasCtx.clearRect(0,0,showCanvasCtx.canvas.width,showCanvasCtx.canvas.height); } ``` A general approach (not specific to Android) would be to detect the press and...
[ 0.28050222992897034, -0.13957583904266357, 0.938880443572998, -0.44145774841308594, 0.034738264977931976, 0.013522683642804623, 0.49308183789253235, -0.544244647026062, -0.14648476243019104, -0.440738320350647, -0.46014291048049927, 0.602440595626831, -0.2699136435985565, -0.03670967742800...
periodic task.
[ -0.0182461217045784, -0.01421361044049263, 0.34873470664024353, 0.08521917462348938, -0.24461941421031952, -0.013242082670331001, 0.16198725998401642, -0.05833440646529198, -0.774873673915863, -0.3147321939468384, -0.1356777399778366, 0.3169510066509247, 0.04480309411883354, -0.04597798362...
I am programming a video app using AVFoundation library. Basically, I am recording video to a file, and listens to the following event when recording finishes. ``` - (void)captureOutput:(AVCaptureFileOutput *)captureOutput didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL fromConnections:(NSArray *)connectio...
[ 0.4998798072338104, 0.047737184911966324, 0.4865284264087677, 0.07294993847608566, 0.29333552718162537, -0.1694818139076233, 0.3152265250682831, -0.04786796122789383, -0.18133358657360077, -0.6202747821807861, 0.011703713797032833, 1.0371450185775757, -0.15264233946800232, 0.04741758853197...
case AVErrorDiskFull: { //do something } } } ``` When I ran my app in a low-disc space phone, I got a weirld error `-12670`. I guess it's the similiar to diskfull, however, I couldn't find the error code in `AVError.h`. Is there any easy way to find the corresponding macros to a random error code? (I need...
[ -0.34043627977371216, 0.2832988500595093, 0.4031069874763489, -0.01763983815908432, 0.06515362113714218, -0.0050615486688911915, 0.09245401620864868, 0.0773390680551529, -0.22814993560314178, -0.42724117636680603, 0.11598466336727142, 1.0227398872375488, -0.24336692690849304, -0.0033066649...
whole story. Regards, Howard From the documentation <https://developer.apple.com/documentation/avfoundation/avfoundation_constants?language=objc> and here is some filler text for your amusement.
[ 0.43314266204833984, -0.04008534923195839, -0.028360046446323395, 0.23327650129795074, 0.3739366829395294, -0.2763313055038452, 0.07468625158071518, 0.6355786919593811, -0.5136057138442993, -0.10913403332233429, -0.38179558515548706, 0.5347763895988464, 0.11340741813182831, 0.3240821063518...
I am looking to do some method chaining. I have the following code: ``` class MyClass attr_accessor :handler def do_a puts 'i just did a' self.handler = 'a' self end def do_b_if_a puts 'i just did b' if handler == 'a' end end ``` So the following works: ``` irb > test = MyClass.new =>...
[ 0.311469703912735, 0.04373447969555855, 0.10826020687818527, -0.4446786046028137, -0.11005828529596329, -0.2411034107208252, 0.37528854608535767, -0.4350047707557678, -0.21404027938842773, -0.5935336947441101, 0.13906064629554749, 0.4285985827445984, -0.3094698488712311, 0.0474636405706405...
do\_b\_if\_a can be called at any time. But I only want it to be called when it is chained with do\_a, how do I do that? I think you're tracking state in the wrong place. You'd be better off with something similar to ActiveRecord's query interface, for example: ``` class MyClass attr_accessor :handler def do_a ...
[ 0.253553181886673, -0.24259722232818604, -0.06766333431005478, -0.303016722202301, 0.0902118906378746, -0.06766427308320999, 0.2427220493555069, -0.3025822639465332, -0.21115249395370483, -0.37853333353996277, -0.052170783281326294, 0.35714462399482727, -0.5950016975402832, 0.2038154453039...
h o end end ``` That way you always have an instance of MyClass but you have a throw-away copy that keeps track of its history. This is similar to [cHao's](https://stackoverflow.com/users/319403/chao) approach but it doesn't need an extra decorator class as MyClass can decorate itself.
[ -0.036573175340890884, 0.023945365101099014, 0.4365159571170807, 0.06224028021097183, -0.07390045374631882, -0.4197148382663727, 0.15750530362129211, -0.11854539811611176, -0.02133011259138584, -0.7056056261062622, -0.17354829609394073, -0.019638627767562866, -0.01901189610362053, 0.375562...
This is on iOS5 w/ a storyboard. I'd like to have a `UINavigationController` on the `UITableView` below but when I try the "embed in" option, it adds it to the Red `UIView`, not on the table itself. For lots of reasons this is not optimal. Is what I want to do not possible: to have a table subview with its own nav con...
[ -0.012087865732610226, -0.24322570860385895, 0.8172295689582825, 0.2024763822555542, 0.012332846410572529, -0.14238522946834564, 0.12357611209154129, 0.30956315994262695, -0.4869743585586548, -0.8509009480476379, -0.09887728840112686, 0.44394633173942566, -0.12470807880163193, 0.0916253924...
not able to enter any values to resize it ![enter image description here](https://i.stack.imgur.com/MKmg9.png) > For lots of reasons this is not optimal Actually, for lots of reasons what you are trying to do makes no sense. A UINavigationController has embedded within it (in Storyboard terms) an instance of a UIView...
[ 0.004196301102638245, -0.3060675859451294, 0.37612664699554443, 0.4552556574344635, 0.0629621297121048, -0.2519768178462982, 0.3622327148914337, -0.006542483810335398, -0.20620177686214447, -0.6870017051696777, -0.23294658958911896, 0.3419758379459381, -0.33695173263549805, 0.4092328250408...
need to put a UITableView inside of a UINavigationController? What you are probably trying to achieve is to place the view controller that the table view sits on inside a UINavigationController, in which case the result you're seeing in IB is the correct result.
[ 0.06092297285795212, -0.24385030567646027, 0.5015782713890076, 0.3153156638145447, 0.0007952162995934486, -0.09308081865310669, -0.17859932780265808, 0.13071909546852112, -0.23356564342975616, -0.846458375453949, -0.12606181204319, 0.4317617118358612, -0.24353083968162537, 0.14798878133296...
I have been trying to wrap my head around this issue for the past few hours but with no success. If you look at this [page](http://ftfranes.com/mliad2/). On the left side, where its titled "Latest Tweets", there is a mysterious left-padding to the list of tweets. I can assure you that I have not added any styling to i...
[ 0.5414161682128906, -0.12927863001823425, 0.804155707359314, 0.036245111376047134, 0.08396876603364944, -0.4547367990016937, 0.18224744498729706, 0.17348052561283112, -0.4699779450893402, -0.6631041169166565, 0.33431491255760193, 0.4134068191051483, -0.008917505852878094, 0.108634777367115...
Game of Thrones. Can someone kindly assist me in solving this issue so that I can call it a night? You have `margin-left: 15px;` on `.projects li`. That is what causes the move to the right... Perhaps you added it for the list of videos, but it is affecting the list of the tweets since both are under the `projects` ...
[ -0.001985852839425206, -0.2671625018119812, 0.5495115518569946, 0.11636896431446075, -0.08099324256181717, -0.31391337513923645, -0.04117622599005699, -0.1855372041463852, -0.6938768625259399, -0.6852428913116455, -0.08456061035394669, 0.24307167530059814, -0.006213613320142031, 0.21736063...
Does anybody know the difference between these two commands to switch and track a remote branch? ``` git checkout -b branch origin/branch git checkout --track origin/branch ``` I think both keep track of the remote branch so I can push my changes to the branch on origin, right? Are there any practical differences? ...
[ 0.09785690158605576, -0.18422919511795044, 0.2661893963813782, 0.22210058569908142, 0.2735106647014618, 0.005721240770071745, 0.28242892026901245, 0.12015198171138763, -0.47325190901756287, -0.29581791162490845, -0.0995965525507927, 0.6720394492149353, -0.19926764070987701, 0.1230688616633...
[as commented](https://stackoverflow.com/questions/10002239/difference-between-git-checkout-track-origin-branch-and-git-checkout-b-branch/10002469#comment82673579_10002469) by [Sebastian Graf](https://stackoverflow.com/users/388010/sebastian-graf), if the local branch did *not* exist already. If it did, you would ne...
[ -0.1787942498922348, -0.04980115965008736, 0.31892988085746765, 0.16722096502780914, 0.29476630687713623, 0.1405324786901474, 0.17656046152114868, -0.06964574009180069, -0.4576985538005829, -0.3781989514827728, -0.465458482503891, 0.13721460103988647, -0.30247288942337036, 0.30320650339126...
exists on the 'origin' remote. Here, '`-c`' is the new '`-b`'. --- First, some background: **Tracking** means that a local branch has its upstream set to a remote branch: ``` # git config branch.<branch-name>.remote origin # git config branch.<branch-name>.merge refs/heads/branch ``` --- `git checkout -b branch ...
[ -0.007135205902159214, -0.0668470561504364, 0.5407835841178894, -0.013594531454145908, 0.4479868412017822, -0.10956098139286041, 0.17467111349105835, 0.07301471382379532, -0.26509806513786316, -0.6384152770042419, -0.23635360598564148, 0.3593284785747528, -0.15590186417102814, 0.5200018286...
may be changed via the global `branch.autosetupmerge` configuration flag. That setting can be overridden by using the `--track` and `--no-track` options, and changed later using git branch `--set-upstream-to`. --- And `git checkout --track origin/branch` will do the same as [`git branch --set-upstream-to`](https://gi...
[ -0.11726928502321243, -0.2236059159040451, 0.767535924911499, -0.12311620265245438, 0.25821250677108765, 0.2840525507926941, 0.1495903581380844, 0.2896260917186737, -0.39603933691978455, -0.32130610942840576, -0.35304316878318787, 0.2987219989299774, -0.10651791095733643, 0.592045664787292...
a local branch will: * tell git to **show the relationship between the two branches in `git status` and `git branch -v`**. * directs **`git pull` *without arguments* to pull from the upstream when the new branch is checked out**. See "[How do you make an existing git branch track a remote branch?](https://stackoverfl...
[ 0.1955396831035614, -0.3308831453323364, 0.3479473292827606, 0.3057408928871155, 0.13764043152332306, -0.201645627617836, 0.28784623742103577, 0.24584442377090454, -0.29306691884994507, -0.28971800208091736, -0.29335254430770874, 0.40104636549949646, 0.11369047313928604, 0.2289295494556427...
I'm trying to have a console application to send a XML file to a web application developed in ASP.NET MVC 3, and receive another XML as a response. The error returned in the console application is: > The remote server returned an error: (500) Internal Server Error. When I get Fiddler2 running, I see this error: >...
[ 0.21962592005729675, 0.09441091120243073, 0.6316210031509399, -0.21604958176612854, -0.06375083327293396, -0.013283372856676579, 0.5187432765960693, -0.2682492434978485, -0.018238617107272148, -0.6507343053817749, -0.08641720563173294, 0.5493358373641968, -0.23241782188415527, 0.3525829613...
Console.WriteLine(s); Console.ReadKey(); } ``` The code in the MVC Controller is: ``` [HttpPost] public ActionResult Test(HttpPostedFileBase file) { XElement xml = XElement.Load(new System.IO.StreamReader(file.InputStream)); var test = new MyTest(); return File(test.RunTest(xml), "text/xml", "testres...
[ 0.04245389252901077, -0.10713724792003632, 0.88222336769104, -0.07088346034288406, -0.12183942645788193, 0.04016239568591118, 0.3790757358074188, -0.4113227128982544, 0.08424316346645355, -0.5845333933830261, -0.17260012030601501, 0.7098534107208252, -0.19278982281684875, 0.278254508972167...
send a file? Or is it the case to change the MVC method? And, before trying to use `WebClient`, I tried this code here: <http://msdn.microsoft.com/en-us/library/debx8sh9.aspx>, and had the same results. Your problem is that WebClient.UploadFile isn't posting a form with the enctype set to multipart/form-data using an ...
[ 0.37133070826530457, -0.16244104504585266, 0.488981693983078, -0.1312284618616104, -0.4833154082298279, 0.030492516234517097, 0.49343591928482056, -0.4598589837551117, -0.051725856959819794, -0.6716962456703186, -0.22965362668037415, 0.5211760997772217, -0.5035434365272522, 0.2041518092155...
I have a fairly simple pagination query used to get rows from a table ``` ALTER PROCEDURE mytable.[news_editor_paginate] @count int, @start int, @orderby int AS BEGIN SET NOCOUNT ON; SELECT TOP (@count) * FROM ( SELECT news_edits.*, ROW_NUMBER() OVER ( ORDER BY CA...
[ -0.014173885807394981, 0.24028879404067993, 0.5426298975944519, -0.06955652683973312, -0.11514836549758911, 0.0956025943160057, -0.23375245928764343, -0.0850590243935585, -0.24821653962135315, -0.5889515280723572, 0.07300351560115814, 0.4118541181087494, -0.28265249729156494, 0.32800373435...