text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
{ q.Enqueue(Guid.NewGuid()); Thread.Sleep(100); } }); Thread producer2 = new Thread(() =>
[ 0.1872745007276535, -0.25598904490470886, 0.4794832468032837, -0.448164165019989, 0.4736672043800354, 0.18825235962867737, 0.3165419101715088, -0.09480233490467072, -0.21693702042102814, -0.6287806034088135, -0.048366885632276535, 0.45219433307647705, -0.18870246410369873, 0.79189240932464...
{ while (running) { q.Enqueue(Guid.NewGuid()); Thread.Sleep(25); } }); Thread consumer = new Thread(() =>
[ 0.10283398628234863, -0.3381383717060089, 0.6180540919303894, -0.4379158616065979, 0.3963993191719055, 0.3700670003890991, 0.3985415995121002, -0.08295111358165741, -0.31811702251434326, -0.6414651870727539, -0.16561463475227356, 0.5604891180992126, -0.15163524448871613, 0.7772624492645264...
{ while (running) { if (q.Count > 0) {
[ 0.08285820484161377, -0.41528618335723877, 0.293637752532959, -0.3270891010761261, 0.2978143095970154, -0.06813408434391022, 0.629118025302887, -0.030670294538140297, 0.01888691447675228, 0.1310642808675766, -0.22151614725589752, 0.5615474581718445, -0.1783776730298996, 0.1877269148826599,...
Guid g = (Guid)q.Dequeue(); Console.Write(g.ToString() + " "); } else {
[ -0.6000875234603882, -0.06288129091262817, 0.41352933645248413, -0.3275410234928131, 0.2313411384820938, 0.23579750955104828, 0.28749996423721313, -0.35572370886802673, 0.3867475986480713, -0.5416491031646729, -0.3477177023887634, 0.8856447339057922, -0.482839971780777, -0.0140563463792204...
Console.Write(" . "); } Thread.Sleep(1); } }); consumer.IsBackground = true;
[ -0.030526285991072655, -0.2402956187725067, 0.588922917842865, -0.27495142817497253, 0.47645965218544006, 0.033612340688705444, 0.11972710490226746, -0.02404521219432354, 0.18674442172050476, -0.6523374915122986, -0.22711297869682312, 0.9332515001296997, -0.028134843334555626, 0.5527061223...
consumer.Start(); producer1.Start(); producer2.Start(); Console.ReadLine(); running = false; } } ```
[ 0.5888001322746277, -0.05296507850289345, 0.40838971734046936, -0.33086663484573364, 0.19324620068073273, 0.2678624987602234, -0.0706951841711998, 0.11385568231344223, 0.18280506134033203, -0.40970027446746826, -0.40522220730781555, 0.8553013205528259, -0.08503510057926178, 0.7983804941177...
It's very annoying that `copy_if` is not in C++. Does anyone know if it will be in C++0x? Since the C++0x is not yet finalized, you can only take a look at the most recent [draft](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2857.pdf).
[ 0.4504808485507965, 0.2920190095901489, 0.22038237750530243, 0.14365510642528534, 0.23282551765441895, -0.5752245783805847, -0.048447247594594955, 0.03484291583299637, -0.049679506570100784, -0.47979432344436646, -0.26788386702537537, 0.4023762047290802, -0.2644999921321869, 0.130087628960...
Is there any way to speed up the initialization of javax.xml.bind.JAXBContexts with a large (>1000) number of classes? In our XML heavy application the startup time is some 10 minutes and consists mainly of the initialization time of the JAXBContexts. :-( We are using Sun's JAXB implementation in the JDK 1.5 and the o...
[ -0.023789182305336, -0.03914839029312134, 0.31565171480178833, 0.01217870693653822, -0.12253369390964508, 0.06015999615192413, 0.19182945787906647, -0.37820833921432495, 0.15947863459587097, -0.8553248047828674, -0.12258241325616837, 0.39795294404029846, 0.14848236739635468, -0.36316213011...
(Our XSDs are fairly large and complicated.) All JAXBContext instances have different contextpaths - we cannot reduce the number further. The JAXB reference implementation has a sort-of-undocumented system property for exactly this reason: ``` -Dcom.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.fastBoot=true ``` ...
[ 0.015511032193899155, 0.07758420705795288, 0.339493989944458, 0.042087621986866, -0.11509281396865845, -0.1854662448167801, 0.3762122094631195, -0.21895600855350494, 0.12426532804965973, -0.9540850520133972, -0.13378028571605682, 0.5388568639755249, -0.40007227659225464, -0.073725417256355...
JAXB has to load every single one of your classes, and classloading is slow. This is apparent if you create a 2nd context immediately after the first, with the same configuration - you'll see it's much, much faster, having already loaded the classes. Also, you say that you have multiple JAXBContext instances because y...
[ 0.028045639395713806, -0.14484228193759918, 0.03559526056051254, -0.10360866785049438, -0.14797882735729218, 0.14409101009368896, 0.2671789228916168, -0.06146702170372009, -0.1065710037946701, -0.7267078757286072, -0.13452282547950745, 0.3870905935764313, -0.5382336974143982, -0.0007910819...
performance, though.
[ -0.05534505099058151, -0.14231830835342407, -0.07982000708580017, 0.24906998872756958, -0.29399964213371277, 0.036932334303855896, 0.19370539486408234, 0.010223859921097755, -0.1710941642522812, -0.3788687288761139, 0.42099541425704956, 0.36576956510543823, 0.4053305685520172, -0.664880514...
I'm trying to come up with some regex to handle the # sign. Example, #PRODUCT\_143# If the input were #PRODUCT\_143, the regex `#PRODUCT_(\d*$)` matches and returns 143 as the match. But adding the # to the end of both the input and the regex causes it to break. what do I need to do here to get this to match? If you ...
[ 0.1730753630399704, 0.27250880002975464, 0.5067939758300781, -0.1308000236749649, -0.2940342128276825, -0.09487202763557434, 0.020320286974310875, -0.416893869638443, -0.05765736848115921, -0.5439617037773132, 0.1644444614648819, 0.2913629710674286, -0.5377160906791687, 0.29204273223876953...
I am able to view the Estimated Execution Plan (Management Studio 9.0) for a query without a problem but when it comes to stored procedures I do not see an easy way to do this without copying the code from the ALTER screen and pasting it into a query window, otherwise it will show the plan for the ALTER and not the pro...
[ 0.14070791006088257, 0.11577419936656952, 0.13214433193206787, 0.032408881932497025, 0.1353287249803543, -0.04183557629585266, 0.3541922867298126, -0.1179404929280281, -0.2859618067741394, -0.6876537799835205, 0.3125372529029846, 0.9593542218208313, -0.14233019948005676, -0.110632427036762...
not sure. Could I do the estimated execution plan on ``` exec myStoredProc 234 ``` ``` SET SHOWPLAN_ALL ON GO -- FMTONLY will not exec stored proc SET FMTONLY ON GO exec yourproc GO SET FMTONLY OFF GO SET SHOWPLAN_ALL OFF GO ```
[ -0.0714000016450882, 0.3265630900859833, 0.48048481345176697, 0.02966318652033806, 0.389224648475647, 0.004599845968186855, 0.16783326864242554, -0.05837031826376915, -0.2590951919555664, -0.42407435178756714, -0.19222861528396606, 0.9199710488319397, -0.1869461089372635, -0.10041423887014...
Has someone used a configuration enabling the garbage collector optimized for multi-processor machines using Aspnet.config with : ``` <gcServer enabled="true"/> <gcConcurrent enabled="true"/> ``` Was there an improvement in the performance of your site? Are any problems noticed? First, Concurrent and Server are...
[ -0.08293701708316803, -0.11275603622198105, 0.2150690108537674, 0.12023811787366867, -0.47177499532699585, -0.11177156120538712, 0.170022115111351, 0.2767743766307831, -0.8898916840553284, -0.4738823473453522, 0.07724189758300781, 0.30624741315841675, -0.43930643796920776, 0.37298578023910...
"hangs". I have used the server GC, and noticed significant improvements in certain situations. The server mode GC does help user apps, though, if you're user application is working with huge memory pools, and getting highly fragmented.
[ 0.39449864625930786, -0.227444589138031, 0.4405920207500458, 0.3759906589984894, -0.19683673977851868, -0.47783222794532776, -0.19187700748443604, 0.04903721809387207, -0.7087660431861877, -0.053504638373851776, -0.03145552799105644, 0.19217565655708313, -0.08846509456634521, -0.0706660002...
How can I hook in the ErrorProvider with individual cells on the DataGridView control? I'm not sure that you can use the ErrorProvider in this manner, however the DataGridView has functionality built into it that's basically the same idea. The idea is simple. A DataGridViewCell has an ErrorText property. What you do i...
[ 0.010329201817512512, -0.013413912616670132, 0.24641335010528564, -0.021829616278409958, 0.12552517652511597, -0.15104542672634125, 0.40488043427467346, -0.2519400715827942, -0.04112061485648155, -0.6797946095466614, 0.18198785185813904, 0.5393149852752686, -0.4528101980686188, 0.120783418...
{ if (!this.Validates(e.FormattedValue)) //run some custom validation on the value in that cell { this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].ErrorText = "Error"; e.Cancel = true; //will prevent user from leaving cell, may not be the greatest idea, yo...
[ -0.07500685751438141, -0.13795161247253418, 0.32918763160705566, 0.0656096339225769, 0.6592822670936584, -0.21952663362026215, 0.4666496813297272, -0.27280592918395996, -0.0879935771226883, -0.44864621758461, -0.1589670032262802, 0.2885722815990448, -0.23843884468078613, 0.0727361366152763...
} } ```
[ 0.17493881285190582, 0.41805654764175415, 0.05209751054644585, -0.04864929988980293, 0.437467485666275, -0.15825650095939636, 0.13202530145645142, 0.5446501970291138, 0.35430577397346497, -0.4846813380718231, -0.2295716553926468, 0.546978771686554, -0.3188462555408478, 0.2798506021499634, ...
I am looking for lightweight multi-threading framework for C++. I found POSIX Threads. Please, share you practical experience with POSIX threads: before I start with it I want to know its pros and cons from real people, not from wiki. If you practically compared it with anything (maybe, better), it would be inter...
[ 0.46668970584869385, 0.039658017456531525, 0.045084696263074875, 0.11499117314815521, -0.08062471449375153, -0.0552268847823143, -0.09140433371067047, 0.2626674771308899, -0.46913018822669983, -0.8323509097099304, 0.1615639179944992, 0.49367308616638184, -0.20674370229244232, -0.1768847405...
it is commercial, not free, but I need a free one. I found [Boost.Threads](http://www.boost.org/doc/libs/1_38_0/doc/html/thread.html) to be really nice, especially after the 1.35 rewrite. POSIX threads on Windows is not so trivial, and it's a C API, so I would definitely prefer Boost to it. It has all the stuff you nee...
[ 0.4580787718296051, -0.027112556621432304, 0.21397022902965546, 0.04262230917811394, -0.1059587150812149, -0.27020347118377686, -0.18133650720119476, 0.31695353984832764, 0.007537445519119501, -0.32449090480804443, 0.17831644415855408, 0.7578368782997131, -0.14429987967014313, 0.0207034833...
In my web-application I'm using `$_SESSIONS` but sometimes, when the users hits the backspace key he gets: > Webpage has expired message. Why is this happening? What can i do to avoid this? It also has to do with the cache control directives sent to the browser. Take a look at <http://de.php.net/manual/en/session.co...
[ 0.11524567008018494, 0.2164924591779709, 0.4252355098724365, -0.08238419890403748, -0.12295114248991013, -0.22816918790340424, 0.6183187365531921, -0.09376788139343262, -0.3021461069583893, -0.7129948735237122, -0.09857922047376633, 0.45030972361564636, -0.15374277532100677, 0.466691821813...
What are some tips I can use to avoid memory leaks in my applications? Are there any gotchas or pitfalls that I can look out for? Call Dispose on IDisposable objects or use the `using` clause. That should take care of most of the leaks I can think of.
[ 0.6283190846443176, 0.29449188709259033, -0.008891520090401173, 0.5309011340141296, 0.19920723140239716, -0.33325061202049255, 0.3529649078845978, 0.3081003725528717, -0.10061130672693253, -0.463204950094223, 0.05376091226935387, 0.6674577593803406, -0.04779405891895294, 0.0612899549305439...
I have the following bit of code to create an automatically resized text input: ``` // setup quick jump input $("#goto").keydown(function(e){ var size = $(this).val().length; // sanity if ( size < 1 ) { size = 1; } $(this).attr("size",size); // if enter then GOTO-> if ( e.keyCode == 13 ) { win...
[ 0.22890514135360718, -0.013467282988131046, 0.6078705191612244, -0.06774961203336716, 0.09566254168748856, 0.09160538017749786, 0.5756963491439819, -0.35184192657470703, -0.19625675678253174, -0.668276846408844, -0.24004286527633667, 0.7905120849609375, -0.28458696603775024, 0.062959045171...
or my implementation. EDIT: sorry I wasn't clear enough at first - it's the part where I'm trying to update the size of the input on the fly that is broken. My bad. Thanks for the feedback so far, some very useful links there. I doubt that the size attribute would work cross browser. I would switch to setting the maxl...
[ 0.46057912707328796, -0.009858903475105762, 0.1649610847234726, -0.06026146560907364, -0.3700137138366699, 0.10205162316560745, 0.23400625586509705, 0.00655391113832593, -0.4843573570251465, -0.559399425983429, 0.09429894387722015, 0.5631561279296875, -0.2673315703868866, -0.12215954810380...
I am looking to create a user/server control that will be created with something like the following: ``` <my:MyListControl runat="server"> <asp:ListItem Text="Test1" Value="Test1" /> <asp:ListItem Text="Test2" Value="Test2" /> </my:MyListControl> ``` I am just looking for a start here: Articles or code samples...
[ 0.24911755323410034, 0.06819982081651688, 0.041409093886613846, 0.07749565690755844, -0.13738061487674713, -0.0016515832394361496, -0.004937281832098961, -0.15203484892845154, -0.1891944259405136, -0.6957122683525085, 0.1466922014951706, -0.01098547875881195, -0.33816099166870117, 0.140922...
fixing a spelling mistake or formatting bug involves a recompile, which is not ideal. EDIT: ===== Here's my code with the addition of Josh's suggestion below: Namespace MySite.Controls Partial Class BreadCrumbs Inherits UserControl ``` Private m_BreadCrumbs As New List(Of BreadCrumbItem) <PersistenceMode...
[ -0.1651919186115265, 0.2764027714729309, -0.012575820088386536, -0.12808014452457428, 0.43316155672073364, 0.21312128007411957, 0.481855571269989, -0.07459820806980133, -0.23632961511611938, -0.7508536577224731, -0.18905135989189148, 0.43454232811927795, -0.30011963844299316, 0.22919698059...
m_BreadCrumbs = value End Set End Property Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load Bind() End Sub Private Sub Bind() lvCrumbs.DataSource = Items Me.DataBind() End Sub End Class Public Class BreadCrumbItem Private ...
[ -0.32712358236312866, 0.2727836072444916, 0.5197552442550659, -0.3919522166252136, 0.07695770263671875, 0.21954616904258728, 0.38079795241355896, -0.27345961332321167, -0.1967991441488266, -0.5092236399650574, -0.47950613498687744, 0.34730130434036255, -0.41931840777397156, 0.5855434536933...
Get Return m_Text End Get Set(ByVal value As String) m_Text = value End Set End Property Private m_Url As String Public Property Url() As String Get
[ -0.3402256667613983, 0.06658537685871124, 0.6602041721343994, -0.05405285209417343, 0.018034329637885094, -0.2861435115337372, 0.250652551651001, -0.24823541939258575, 0.08783705532550812, 0.02650815062224865, -0.7785263657569885, 0.6627498865127563, -0.3031906187534332, 0.2875829041004181...
Return m_Url End Get Set(ByVal value As String) m_Url = value End Set End Property End Class ``` End Namespace Then my page code looks like this: ``` <%@ Page Language="VB" AutoEventWireup="false" Inherits="MySite.MyPage" Title="My Page" Codebehind="MyPage.aspx.vb" %> <%@ Reg...
[ -0.015511923469603062, 0.1919836699962616, 0.9699054956436157, -0.05333598703145981, 0.07365700602531433, -0.2459496557712555, 0.24416138231754303, -0.5505639314651489, -0.035946499556303024, -0.8550860285758972, -0.25334179401397705, 0.24291172623634338, 0.022504528984427452, 0.4148894846...
control's code behind like: ``` [PersistenceMode(PersistenceMode.InnerProperty)] public List<ListItem> Items { get; set; } ``` Your markup would then be: ``` <my:MyListControl runat="server"> <Items> <asp:ListItem/> </Items> </my:myListControl> ``` To make it so ListItem can be your own list item ...
[ -0.19588400423526764, -0.26823824644088745, 0.5311115980148315, 0.32367587089538574, -0.07030481845140457, -0.004041808657348156, -0.09828636050224304, -0.35096827149391174, -0.015535113401710987, -0.4596620798110962, 0.20780052244663239, 0.3678716719150543, -0.4792373776435852, 0.26231047...
private List<MenuItem> _menuItems = new List<MenuItem>(); [PersistenceMode(PersistenceMode.InnerProperty)] public List<MenuItem> MenuItems { get { return _menuItems; } } }
[ -0.24199461936950684, -0.17224222421646118, 0.5440120697021484, -0.30654996633529663, 0.46309390664100647, 0.28604862093925476, 0.4145961403846741, 0.06298520416021347, -0.4054321050643921, -0.8163972496986389, -0.2668876647949219, 0.943165123462677, -0.4759114384651184, 0.2319443374872207...
[ToolboxItem(false)] [ParseChildren(true, "MenuItems")] public class MenuItem { private string _clientClick; private List<MenuItem> _menuItems = new List<MenuItem>(); [Localizable(true)] public string Title { get; set; } public string Href { get; set; } publi...
[ -0.09986887127161026, -0.17970892786979675, 0.49421095848083496, -0.17682582139968872, 0.32911181449890137, 0.11799370497465134, 0.4598713219165802, 0.007719225715845823, -0.1030140146613121, -0.6320610642433167, -0.38395801186561584, 0.9696769714355469, -0.31113532185554504, 0.39777469635...
public List<MenuItem> MenuItems { get { return _menuItems; } set { _menuItems = value; } } } ``` Now I can use this like: ``` <my:Menubar runat="server" ID="menuBar"> <MenuItems> <my:MenuItem Title="Save" Href="javascript:saveItem(this);" /> <my:MenuIt...
[ -0.1176334023475647, 0.17732609808444977, 0.482706755399704, -0.34517771005630493, 0.08177734911441803, -0.022720325738191605, 0.25223615765571594, -0.19312188029289246, -0.13629479706287384, -0.8123305439949036, -0.2545623481273651, 0.6100472807884216, -0.20540624856948853, 0.177158713340...
<MenuItems> <my:MenuItem Title="Preview" Href=""/> <my:MenuItem Title="To Pdf" Href="javascript:"/> </MenuItems> </my:MenuItem> </MenuItems> </my:Menubar> ```
[ -0.35302630066871643, 0.14378191530704498, 0.4676509499549866, -0.16549129784107208, -0.3158040940761566, 0.02153763361275196, 0.023438891395926476, 0.04747831076383591, 0.07180283218622208, -0.8193854093551636, -0.6517974734306335, 0.484887957572937, -0.09681645035743713, -0.0292704273015...
I have a primary key that I don't want to auto increment (for various reasons) and so I'm looking for a way to simply increment that field when I INSERT. By simply, I mean without stored procedures and without triggers, so just a series of SQL commands (preferably one command). Here is what I have tried thus far: ```...
[ 0.2725648283958435, -0.04968981072306633, 0.4287722408771515, -0.2019110769033432, 0.255900502204895, 0.04216659069061279, 0.06978436559438705, -0.49690842628479004, -0.150760680437088, -0.28129127621650696, -0.09336858242750168, 0.8595619797706604, -0.2060985267162323, -0.0796835869550705...
allowed" So, how can I do this/what am I doing wrong? --- EDIT: Since it was pointed out as a consideration, the table to be inserted into is guaranteed to have at least 1 row already. You understand that you will have collisions right? you need to do something like this and this might cause deadlocks so be very su...
[ 0.19300805032253265, -0.009865086525678635, 0.6910278797149658, 0.11293209344148636, 0.26324978470802307, -0.33016470074653625, -0.10545756667852402, -0.28799575567245483, -0.37036624550819397, -0.32657963037490845, -0.08055361360311508, 0.7958474159240723, -0.44424593448638916, -0.0327396...
I have provided some code first create this table and insert one row ``` CREATE TABLE Table1(id int primary key not null, data_field char(100)) GO Insert Table1 values(1,'[blob of data]') Go ``` Now open up two query windows and run this at the same time ``` declare @i int set @i =1 while @i < 10000 begin BEGIN TR...
[ -0.16253185272216797, 0.18275690078735352, 0.8606580495834351, 0.0977621003985405, 0.2831569314002991, 0.053113024681806564, 0.009803828783333302, -0.41898632049560547, -0.2634304463863373, -0.5133785605430603, -0.22953756153583527, 0.537519633769989, -0.31683340668678284, 0.29246482253074...
I have the following [script](http://jqueryfordesigners.com/slide-out-and-drawer-effect/) in my homepage ``` $(function () { // same as $(document).ready(function () { }) // assuming we have the open class set on the H2 when the HTML is delivered $('li.drawer h2:not(.open)').next().hide(); $('h2.drawer-handle')...
[ -0.06290892511606216, 0.059084173291921616, 0.7802408337593079, -0.35545575618743896, 0.1816606968641281, -0.04495453089475632, 0.28023114800453186, -0.4096936285495758, -0.27586492896080017, -0.9279052019119263, -0.284923255443573, 0.5459266304969788, -0.3860708177089691, 0.13043053448200...
beta3. **How can you get the above jQuery script work in Firefox?** [edit] **First lines of my index.html** ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta content="te...
[ 0.049778908491134644, -0.08951234817504883, 0.14183859527111053, -0.02569185011088848, -0.2570216655731201, -0.1413046270608902, 0.07628409564495087, -0.4882192611694336, 0.15077295899391174, -0.7015739679336548, 0.023770175874233246, 0.2798936069011688, -0.6552603840827942, -0.20848581194...
<li> <div class="">aaa </div> </li> </ul> </li> <li class="drawer"> <h2 class="drawer-handle">Unpublished</h2> <ul> <li class="italic"> <i>A</i> (2009). </li>
[ -0.6214457154273987, -0.1057080551981926, 0.23365777730941772, -0.19122639298439026, -0.13301770389080048, 0.6737777590751648, -0.06697611510753632, -0.47906896471977234, -0.41164541244506836, -0.3594239056110382, -0.1085173636674881, 0.15047401189804077, -0.14213620126247406, 0.2658558189...
<li class="italic"> <i>aaa</i> (2008). </li> </ul> </li> <li class="drawer"> <h2 class="drawer-handle">Recent projects</h2> <ul> <li class="italic"> Websites </li>
[ -0.3580004870891571, -0.03557287156581879, 0.4570819139480591, -0.11927121132612228, -0.043534811586141586, 0.3990393280982971, -0.1967483013868332, -0.2712813913822174, -0.6765426397323608, -0.5085165500640869, -0.05512971058487892, 0.0563044399023056, -0.15222175419330597, 0.275895386934...
<li class="italic"> Search <form action="http://www.google.com/cse" id="cse-search-box"> <div> <input type="hidden" name="cx" value="8834479:1qd7hky6khe" /> <input type="hidden" name="ie" value="UTF-8" /> <input type="text" name="q" size="...
[ -0.3308921456336975, -0.09954776614904404, 0.1353984922170639, -0.2003810852766037, 0.010288872756063938, 0.2900361716747284, 0.24697570502758026, -0.16096968948841095, -0.2607882618904114, -0.6352902054786682, -0.6558279991149902, 0.3953334391117096, -0.3067038655281067, 0.006652337033301...
<input type="submit" name="sa" value="Search" /> </div> </form> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script> </li> </ul> </li> </ul> </div> </body> </html> ``` I got the code to work in Fir...
[ 0.08342131972312927, 0.24638617038726807, 0.4776657521724701, -0.2397650182247162, -0.0902850478887558, -0.12086700648069382, 0.1359727531671524, -0.554266095161438, -0.13066884875297546, -0.750884473323822, -0.3113623857498169, 0.5060043931007385, -0.39073342084884644, -0.3270221650600433...
All platforms welcome, please specify the platform for your answer. A similar question: [How to programmatically get the CPU cache page size in C++?](https://stackoverflow.com/q/150294) You can use [std::hardware\_destructive\_interference\_size](https://en.cppreference.com/w/cpp/thread/hardware_destructive_interfere...
[ 0.09283586591482162, 0.024871576577425003, 0.6000887155532837, 0.18807584047317505, 0.00810165237635374, -0.1332942545413971, -0.16628332436084747, -0.21487461030483246, -0.33596885204315186, -0.6770927906036377, -0.21060259640216827, 0.48745542764663696, -0.21378807723522186, -0.003238881...
I've got a variable number of items, somewhere between 0 and 20. I'd like to list these with Google Static Maps, showing a little "a" for the first one, a "b" for the second one and so on. I'm a newbie using Google App Engine so I'm constrained to 0.96 (unless I use various patches, which I don't want to do. Because ...
[ -0.11571364104747772, 0.015553150326013565, 1.0354951620101929, 0.15948310494422913, 0.08372053503990173, 0.3952590227127075, 0.46029525995254517, -0.26380544900894165, -0.472034752368927, -0.5964367389678955, -0.19687601923942566, 0.21446846425533295, 0.10046056658029556, 0.22568009793758...
0-9 on the map. For now, I've cut the result set down to 10. I'd like to go back to 20. Is there a way of using the loopcounter and slice (as in {{ alpha\_list|slice:":loop\_counter"}} ? I struggled with various incantations, trying {{ }} around loop\_counter and without and couldn't get it to work. Thanks! If you wa...
[ 0.2885777950286865, -0.09501565992832184, 0.6778848171234131, -0.20830585062503815, -0.1454748958349228, 0.048786066472530365, 0.25823497772216797, -0.3625529110431671, -0.2719042897224426, -0.7032903432846069, -0.06688901782035828, 0.23111562430858612, -0.39074409008026123, 0.008621669374...
So ASP.net MVC by default ships with both JQuery and ASP.net Ajax. While the use cases of JQuery are obvious and plenty, I just wonder what the point of ASP.net Ajax is? If I just have my Controller Actions return JSON, I don't need it? Also, any "old" ASP.net controls only work if you use the Webforms view Engine (I t...
[ 0.022991802543401718, -0.1473267376422882, 0.3871251344680786, 0.15315943956375122, -0.3618498146533966, -0.4622698426246643, 0.012842965312302113, 0.1959906965494156, -0.2568226158618927, -0.7789521217346191, 0.070799320936203, 0.7831505537033081, -0.2540736198425293, -0.18193894624710083...
to use similarly named APIs as you would in typical .NET programming. You have a bit more string functions and so forth. That being said, I typically bypass ASP.NET AJAX altogether and find most of what I need in JQuery and other smaller libraries. ASP.NET AJAX is a bit top heavy for my tastes but it does have its uses...
[ 0.4268224537372589, 0.13005849719047546, -0.105215884745121, 0.12679648399353027, -0.4683225750923157, -0.4369644522666931, 0.06827306747436523, 0.3735995292663574, -0.08860012888908386, -0.6889932155609131, 0.17743289470672607, 0.5857936143875122, -0.03531869128346443, -0.1190268993377685...
I am writing a very simple Bash script that [tars](https://en.wikipedia.org/wiki/Tar_%28computing%29) a given directory, encrypts the output of that, and then splits the resultant file into multiple smaller files since the backup media doesn’t support huge files. I don't have a lot of experience with Bash scripting. I...
[ 0.4073278605937958, 0.1409350484609604, -0.02051297202706337, -0.3579632639884949, -0.04708006605505943, -0.07131747901439667, 0.26950761675834656, -0.16097243130207062, 0.0922522246837616, -0.48166623711586, -0.20982317626476288, 0.7182725071907043, -0.2571299970149994, -0.055771637707948...
exit 1 fi DIRECTORY=$1 BACKUP_DIRECTORY=$2 BACKUP_FILE="$BACKUP_DIRECTORY/`date +%Y-%m-%dT%H-%M-%S.backup`" TAR_CMD="tar cv $DIRECTORY" SPLIT_CMD="split -b 1024m - \"$BACKUP_FILE\"" ENCRYPT_CMD='openssl des3 -salt' echo "$TAR_CMD | $ENCRYPT_CMD | $SPLIT_CMD" $TAR_CMD | $ENCRYPT_CMD | $SPLIT_CMD say "Done backing ...
[ 0.005752784200012684, -0.04361744970083237, 0.5918441414833069, -0.24348995089530945, 0.3236269950866699, -0.07244004309177399, 0.6406100392341614, -0.43955427408218384, 0.08676771819591522, -0.2136266976594925, -0.27774009108543396, 1.1178456544876099, -0.4077293872833252, -0.095001645386...
variables. You'll get into a lot of trouble trying to recover quoted arguments. Also: 1. Avoid using all-capitals variable names in scripts. It is an easy way to shoot yourself in the foot. 2. Don't use backquotes. Use $(...) instead; it nests better. --- ``` #! /bin/bash if [ $# -ne 2 ] then echo "Usage: $(ba...
[ 0.06571274995803833, -0.04687997326254845, 0.5115696787834167, -0.022998280823230743, 0.26121240854263306, -0.007419206202030182, 0.44585946202278137, -0.2905764877796173, -0.18281973898410797, -0.3143447935581207, -0.17215025424957275, 1.0895750522613525, -0.36535483598709106, 0.155529409...
When I serialize a enum value using DataContractJsonSerializer, it serializes the numerical value of the enum, not the string name. IE: ``` enum foo { bar, baz } ``` Serializing a value of foo.bar returns "0", not "bar". I'd prefer it the other way around, is there a way to override this? Edit: Because I...
[ 0.016544386744499207, 0.25773921608924866, 0.2848179042339325, -0.36673322319984436, 0.07050620764493942, 0.05559498816728592, 0.35703808069229126, -0.2475963979959488, -0.030530020594596863, -0.5337395668029785, -0.1414998322725296, 0.4540277421474457, -0.6106820702552795, 0.4843879044055...
still kept the EnumType but I only serialize the string version public EnumType Foo { get { return _foo; } set { _foo = value; } } [DataMember] public string FooType { get { return _foo.ToString(); } private set {} } ``` [It looks like this is by design](http://msdn.microsoft.com/en-us/library/bb4121...
[ 0.16431765258312225, -0.21351970732212067, 0.46946775913238525, -0.11253338307142258, -0.07056155800819397, 0.0405823215842247, 0.21463552117347717, -0.3033021092414856, -0.3662862479686737, -0.6331803202629089, -0.036895930767059326, 0.27331894636154175, -0.30308279395103455, 0.1621987223...
serializer which achieves what you are looking for: ``` using System; using Newtonsoft.Json; class Program { static void Main(string[] args) { var baz = Foo.Baz; var serializer = new JsonSerializer(); serializer.Converters.Add(new JsonEnumTypeConverter()); serializer.Serialize(...
[ -0.011235357262194157, -0.20583400130271912, 0.8077335953712463, -0.36152246594429016, 0.17857801914215088, 0.2561330497264862, 0.32643184065818787, -0.24478280544281006, -0.2975635230541229, -0.42311474680900574, -0.30511611700057983, 0.5068373084068298, -0.9553096890449524, 0.50478965044...
return objectType == typeof(Foo); } public override void WriteJson(JsonWriter writer, object value) { writer.WriteValue(((Foo)value).ToString()); } public override object ReadJson(JsonReader reader, Type objectType) { return Enum.Parse(typeof(Foo), reader.Value.ToString()); ...
[ -0.2196539342403412, 0.30795159935951233, 0.4794124960899353, -0.355557918548584, 0.3702186942100525, 0.04161898046731949, 0.6402578949928284, -0.3579352796077728, 0.16544310748577118, -0.5307451486587524, -0.3969244658946991, 0.9116044640541077, -0.5232805609703064, 0.27763959765434265, ...
We are a small team of 4 developers working on a web application. We use trac+svn on a shared server for version control and ticketing and we are happy and satisfied with this. The same shared server also hosts our web application. The application itself is a Perl CGI application that uses CGI::Application and a modera...
[ 0.6591616272926331, 0.11175709217786789, 0.5547949075698853, 0.30494388937950134, 0.23457534611225128, 0.10278676450252533, -0.1702292412519455, -0.06591205298900604, -0.16910190880298615, -0.18463321030139923, -0.10761312395334244, 0.052939631044864655, -0.1852448284626007, 0.194570884108...
from that on the production (shared) server**. We have to live with this as a given. The library layout is identical on all development machines though. Here is a typical, but clearly sub-optimal work-cycle that my colleagues and I follow: 1. Code and test on development machines 2. Checkout/Commit/Update our code o...
[ 0.6947697997093201, -0.05920029059052467, 0.1957080215215683, 0.24084162712097168, -0.007395709864795208, -0.08777424693107605, 0.046807534992694855, -0.30307430028915405, -0.18465138971805573, -0.914827287197113, -0.030501075088977814, 0.6251816153526306, -0.11367844045162201, 0.170882701...
appreciate hearing from others who might be handling this better than we are. For example is there a way to `svn export` and fix the library locations in an automated way? Or is there some completely different way to handle this situation than we have been doing so far. Thank you for your attention You should have scr...
[ 0.7932547926902771, 0.2600915729999542, -0.013640566729009151, 0.4624665081501007, 0.11879890412092209, -0.28105810284614563, 0.13720816373825073, 0.4332047700881958, -0.43050965666770935, -0.7572347521781921, -0.1151382252573967, 0.4354415237903595, 0.01576177030801773, -0.023611620068550...
upload to web server (rsync/ssh/ftp/etc) $> ssh $SERVER migrate_db, set permissions, run unit tests, etc ``` The last one requires ssh access which I always look for but everything else can be done locally. You'd usually have a set of dev configs and a set of production configs (or a script to convert from dev to pro...
[ 0.24337026476860046, -0.11010655015707016, 0.5983768701553345, 0.07691314071416855, -0.33042067289352417, -0.24320335686206818, 0.34757325053215027, -0.2488350123167038, -0.30782613158226013, -0.6960198283195496, -0.16434107720851898, 0.5140134692192078, -0.5385080575942993, 0.102945253252...
We've run across a slightly odd situation. Basically there are two tables in one of our databases that are fed tons and tons of logging info we don't need or care about. Partially because of this we're running out of disk space. I'm trying to clean out the tables, but it's taking forever (there are still 57,000,000+ r...
[ 0.2691570818424225, 0.3479476273059845, 0.2369261384010315, 0.37331056594848633, 0.20171910524368286, -0.20482878386974335, 0.21781355142593384, 0.19551989436149597, -0.5982924699783325, -0.6080985069274902, 0.36529242992401123, 0.44754302501678467, -0.08199750632047653, 0.4364355504512787...
a time, while playing around with X to determine what's actually fastest. For instance X=1000 takes 3 seconds, while X=100,000 takes 26 seconds... which doing the math is slightly faster. But the question is whether or not there is a better way? (Once this is done, going to run a SQL Agent job go clean the table out ...
[ -0.10917699337005615, 0.0032675741240382195, 0.33754831552505493, 0.1538412868976593, 0.13484369218349457, 0.018152762204408646, 0.2290101945400238, -0.3536243438720703, -0.3156772553920746, -0.8887216448783875, -0.03685988858342171, 0.13041627407073975, 0.0868329256772995, 0.1600607484579...
I'm trying to understand what it is about the following code that **is** perfectly happy with loading a text file and displaying its contents, but **isn't** happy with loading a BitmapImage and displaying it on a timer.Elapsed event handler. I understand it has to do with the UI thread. But why is this not a proble...
[ -0.1478549838066101, -0.008838772773742676, 0.8235946297645569, -0.0025950768031179905, -0.07345893979072571, -0.07171547412872314, -0.04312265291810036, -0.5080604553222656, -0.15970364212989807, -0.31228113174438477, -0.2186322808265686, 0.6099646091461182, -0.19493362307548523, 0.111254...
timer: ``` using System; using System.ComponentModel; using System.Timers; using System.Windows; using System.IO; using System.Windows.Threading; using System.Windows.Media.Imaging; ``` and ``` namespace WpfApplication7 { public partial class Window1 : Window, INotifyPropertyChanged { public BitmapImage Ima...
[ 0.11700241267681122, -0.48265936970710754, 0.5535264611244202, -0.09216053783893585, 0.09827660024166107, 0.397217720746994, 0.23456749320030212, -0.5291793942451477, -0.24896538257598877, -0.7593406438827515, -0.3837837278842926, 0.5321688652038574, -0.1776944398880005, 0.2877531945705414...
this.timer.Elapsed += (s, e) => { //---happy loading from text file. UI updates :) this.Message = File.ReadAllText(@"c:\windows\win.ini").Substring(0, 20); PropertyChanged(this, new PropertyChangedEventArgs("Message")); //---not happy loading a BitmapImage. PropertyChanged unhappy...
[ 0.25629574060440063, -0.19408059120178223, 0.7635700702667236, -0.13067865371704102, 0.13378970324993134, -0.014561206102371216, 0.6913040280342102, -0.8310412168502808, -0.5016158223152161, -0.4485326409339905, -0.27357977628707886, 0.6158561110496521, -0.24847544729709625, 0.191054761409...
//{ this.Image = new BitmapImage(new Uri(@"C:\WINDOWS\Web\Wallpaper\Ascent.jpg")); //Edit --Ah hah, thanks Daniel ! // DependencyObject-> Freezable-> Animatable-> // ImageSource-> BitmapSource-> BitmapImage this.Image.Freeze(); //<--- this will fix it, no need for ...
[ -0.016870783641934395, -0.04530536010861397, 0.6016740202903748, 0.20553505420684814, -0.07001204788684845, -0.10186605900526047, 0.31653162837028503, -0.28829705715179443, -0.24325500428676605, -0.772041380405426, -0.47187361121177673, 0.5328811407089233, -0.2868179380893707, -0.049636520...
//"The calling thread cannot access this object because a different thread owns it." PropertyChanged(this, new PropertyChangedEventArgs("Image")); //})); }; } } } ``` I know I can fix this with a "Application.Current.Dispatcher.Invoke". So fixing it isn't the problem. Not understanding w...
[ -0.1706424504518509, 0.08194205909967422, 0.5106641054153442, 0.04259014502167702, 0.1699291169643402, -0.11653125286102295, 0.2789106070995331, -0.09901472181081772, -0.5493684411048889, -0.5416290163993835, -0.2656099796295166, 0.7347327470779419, -0.16224268078804016, 0.2313062846660614...
critical difference between the two scenarios is that BitmapImage is a dependency object, which means it has the concept of an "owning" thread (the thread that created the object). When your main UI thread tries to access the BitmapImage object created on (and owned by) another thread...boom! Strings, on the other han...
[ 0.06243783235549927, -0.4519622325897217, 0.317104697227478, 0.27167272567749023, 0.10098415613174438, -0.444835901260376, 0.10496584326028824, 0.07220615446567535, -0.24458083510398865, -0.4603027403354645, -0.18499867618083954, 0.41443341970443726, -0.29173675179481506, 0.603876054286956...
I have this code: ``` $('.couch-hide').click(function() { $(this).animate({right:0},1000, 'easeOutBounce'); }); ``` I am trying to get it to toggle, so on first click, pop it out, then click again, and place it back inside. Would i need to set a variable as a tracker? To tell what stage it is at? Just...
[ 0.4647608995437622, -0.025204364210367203, 0.6247391700744629, -0.25407180190086365, 0.32098516821861267, 0.24565017223358154, 0.10511172562837601, -0.3291093111038208, -0.19908060133457184, -0.5836793184280396, -0.11116926372051239, 0.5851855278015137, -0.30600231885910034, 0.086647979915...
function() { $(this).stop().animate({right:originalPos},1000, 'easeOutBounce'); }); ```
[ -0.13759784400463104, -0.2173728048801422, 0.2914868891239166, -0.26876258850097656, 0.4166335463523865, 0.3783782720565796, 0.40029463171958923, 0.0021224848460406065, 0.007821806706488132, -0.5647002458572388, -0.4662967622280121, 0.6260830163955688, -0.505306601524353, 0.100613392889499...
What are some common practices you have seen used in the design by obfuscation crowd? I find it interesting to be on projects that are not allowed to be rewritten while, that would be the faster and most efficient solution to the problem. My favorites always revolve around variables...leaving ones in the code that are ...
[ 0.5463566184043884, 0.06867574155330658, -0.30210351943969727, 0.22386126220226288, -0.08934936672449112, 0.08551837503910065, -0.023582933470606804, 0.16113103926181793, -0.32637688517570496, -0.5839208364486694, 0.2793329060077667, 0.4417223632335663, -0.1516941487789154, 0.5417886972427...
Stuff like that... Another one is to include un-used controls that are only visible within the code. I stared at one ASP.NET site for a good hour trying to figure out why a FormView was dropped into it..(there was no answer to that).
[ 0.567473292350769, -0.05496985465288162, -0.027181848883628845, 0.3689146339893341, -0.034206971526145935, -0.12381253391504288, 0.1891290843486786, 0.1633392721414566, -0.14628982543945312, -0.21659395098686218, 0.23388198018074036, 0.1765122264623642, -0.2555573284626007, 0.0120703373104...
In my current situation, it is not unusual for me to have several UNIX computers I connect to, as several different users depending on the situation, and to traverse through various directories on the machines doing things. I use ksh through the entire thing. I was fiddling with my prompt recently, and I was able to g...
[ 0.24815058708190918, -0.05541097745299339, 0.36530205607414246, -0.2168802171945572, 0.17979267239570618, -0.07017546892166138, 0.2365957498550415, 0.5482228398323059, -0.1841941475868225, -0.9741259813308716, -0.004525040742009878, 0.40506136417388916, -0.08582652360200882, 0.243786275386...
if I were in directory "bar", the prompt would be magenta. In both cases, subdirectories should also count, so a simple substring check should be enough. The problem I ran into, however, is that when I run my .profile script, it properly colors the directory--but it no longer dynamically updates whenever I switch to a...
[ 0.47373276948928833, -0.05478770285844803, 0.5227634906768799, -0.3238905966281891, 0.010214337147772312, -0.02803935669362545, 0.3649197518825531, 0.06264285743236542, -0.09537158906459808, -0.8737202882766724, 0.2354317456483841, 0.6017369031906128, -0.18961161375045776, 0.16776807606220...
cannot figure out how to do this on my own, I must bring it to the Stack Overflow community, to add it to future knowledge. Thus, with my long-winded explanation, the "quick version" of my question is as follows: In ksh, how can I set up my prompt to display the current working directory and color the text based on wh...
[ -0.19352363049983978, 0.023135850206017494, 0.5181447863578796, -0.07774678617715836, 0.07139567285776138, -0.0284371767193079, 0.3331834077835083, -0.1425965577363968, -0.04262711852788925, -0.6596664786338806, -0.44713014364242554, 0.3113228678703308, -0.21196523308753967, 0.071378119289...
In response to [this question](https://stackoverflow.com/questions/794902/whats-the-opposite-of-od1) asking about hex to (raw) binary conversion, a comment suggested that it could be solved in "5-10 lines of C, or any other language." I'm sure that for (some) scripting languages that could be achieved, and would like ...
[ 0.06326181441545486, 0.2505052983760834, -0.21418696641921997, -0.008746550418436527, -0.13880984485149384, 0.10679978132247925, 0.25000718235969543, -0.19805371761322021, -0.26675882935523987, -0.5587326884269714, -0.3666679263114929, 0.21328002214431763, -0.4935527741909027, -0.315608084...
or delete these if you don't think these are helpful, but I think that since there has been some discussion of how certain cases should work, some clarification would be helpful. 1. The program must read from stdin and write to stdout (we could also allow reading from and writing to files passed in on the command line...
[ 0.23826850950717926, 0.18481408059597015, 0.20999287068843842, -0.10293730348348618, 0.10552553087472916, -0.31621253490448, 0.39199209213256836, -0.027264021337032318, -0.029373016208410263, -0.41808879375457764, -0.5234052538871765, 0.7328806519508362, -0.2816503047943115, -0.21028129756...
program must compile or run without any special options passed to the compiler or interpreter (so, 'gcc myprog.c' or 'python myprog.py' or 'ruby myprog.rb' are OK, while 'ruby -rscanf myprog.rb' is not allowed; requiring/importing modules counts against your character count). 4. The program should read integer bytes re...
[ -0.11852243542671204, 0.3453834354877472, 0.17775796353816986, -0.056417033076286316, 0.1661393791437149, 0.056433841586112976, 0.38629648089408875, -0.18661241233348846, -0.11832687258720398, -0.23585349321365356, -0.5492311120033264, 0.5815079212188721, -0.18363043665885925, -0.191744446...
individual byte, an odd number of hex digits in the input) is undefined; any behavior (other than actively damaging the user's computer or something) on bad input is acceptable (throwing an error, stopping output, ignoring bad characters, treating a single character as the value of one byte, are all OK) 6. The program ...
[ -0.08428052812814713, 0.17735929787158966, 0.38818761706352234, 0.303011953830719, -0.12878847122192383, 0.04195103794336319, 0.48557761311531067, -0.2284443974494934, -0.3625327944755554, -0.355892539024353, -0.44904252886772156, 0.4249463975429535, 0.023218967020511627, -0.01320113521069...
limit per line in that case, since otherwise you'd get a bunch of ties for 1 line). **edit** Checkers has reduced my C solution to [46 bytes](https://stackoverflow.com/questions/795027/code-golf-hex-to-raw-binary-conversion/795944#795944), which was then reduced to 44 bytes thanks to a tip from BillyONeal plus a bugfix...
[ 0.008261209353804588, -0.14367292821407318, 0.3969339430332184, -0.02782658115029335, -0.06119876727461815, 0.28148800134658813, 0.5124320983886719, -0.18444837629795074, -0.23537693917751312, -0.43972086906433105, -0.16694967448711395, 0.30765870213508606, -0.43252766132354736, -0.0400343...
lines of code (would be 1 if you could put the `#include` on the same line). Note that this has an infinite loop on bad input; the 44 byte solution with the help of Checkers and BillyONeal fixes the bug, and simply stops on bad input. ``` #include <stdio.h> int main(){char c;while(scanf("%2x",&c)!=EOF)putchar(c);} ``...
[ 0.29422512650489807, -0.011849206872284412, 0.5552300810813904, -0.11109811812639236, -0.05449642613530159, 0.3316330015659332, 0.6272205114364624, -0.2652810215950012, -0.20531578361988068, -0.5917493104934692, -0.2900484800338745, 0.0763099193572998, -0.6417674422264099, 0.14932172000408...
We are developing a site that has a Japanese localization. In that site, we display several dynamic fields using `asp:label` and such controls. Recently, we were required to display numbers using "double-byte characters". While it first I thought that was a confusion from the client, he sent me this in an email: ```...
[ 0.3729071021080017, -0.17903590202331543, 0.31697800755500793, 0.006795685272663832, -0.19038231670856476, -0.005698076449334621, 0.0716559886932373, 0.1707768738269806, -0.41953930258750916, -0.526648998260498, -0.23422230780124664, 0.19454333186149597, -0.1375599354505539, 0.001431499375...
is JP? Apparently, there are some other characters in unicode that look just like the 'normal' numbers, but display wider by default. Here's the text from your question pasted into notepad, saved as unicode, and run through XXD: ``` 0000000: fffe 3100 3200 3300 3400 3500 3600 3700 ..1.2.3.4.5.6.7. 0000010: 3800 3900...
[ -0.2495424598455429, 0.020156392827630043, 0.7586283087730408, 0.15190494060516357, -0.4326578974723816, 0.5005514621734619, 0.3944334387779236, -0.12920017540454865, -0.1765635758638382, -0.2703847587108612, -0.23674717545509338, 0.17956683039665222, -0.3602699637413025, -0.06299879401922...
... ``` It looks like where '1' is 0x0031, 'special 1' is 0xff11. If using CSS to display the 'normal' numbers, but with a wider font isn't an option, I'd say you'll have to take the number, convert it to a string, add 0xff10 to every character between 0x0030 and 0x0039 to get what you're looking for.
[ 0.23549842834472656, 0.1913660317659378, 0.17866994440555573, -0.1707756221294403, -0.0945483073592186, 0.23231026530265808, 0.013948962092399597, -0.13166269659996033, -0.1313929557800293, -0.6550261974334717, -0.3538946807384491, 0.3753981590270996, -0.324455589056015, -0.060022532939910...
I'm using itextsharp to generate the PDFs, but I need to change some text dynamically. I know that it's possible to change if there's any AcroField, but my PDF doen's have any of it. It just has some pure texts and I need to change some of them. Does anyone know how to do it? Actually, I have a blog post on how to do ...
[ 0.5952826142311096, -0.03523412346839905, 0.49862319231033325, 0.31251272559165955, 0.022673508152365685, -0.38976120948791504, -0.07707122713327408, -0.1752835363149643, -0.03643713518977165, -0.6299629211425781, 0.017585087567567825, 0.6304826736450195, -0.15219351649284363, 0.0419019646...
can style the form so it doesn't look like a form) If you don't have control over the PDF, let me know how to do it! Here is a link to the full post: [Using a template to programmatically create PDFs with C# and iTextSharp](http://johnnycode.com/2010/03/05/using-a-template-to-programmatically-create-pdfs-with-c-and-...
[ 0.5461088418960571, -0.22590912878513336, 0.4765493869781494, 0.22432544827461243, 0.12840168178081512, -0.5596922636032104, 0.3450937867164612, 0.0353451706469059, -0.09397457540035248, -0.5475086569786072, 0.04942087456583977, 0.46253183484077454, -0.024485962465405464, -0.30354914069175...
> **Possible Duplicate:** > > [Should Usings be inside or outside the namespace](https://stackoverflow.com/questions/125319/should-usings-be-inside-or-outside-the-namespace) What is the difference between ``` namespace x { using y; } ``` and ``` using y; namespace x { } ``` ? The first one has y in scope ...
[ 0.3372340798377991, -0.07151111215353012, 0.07737011462450027, -0.009534033015370369, -0.05919686332345009, 0.028980087488889694, 0.11627702414989471, -0.14803631603717804, -0.24915273487567902, -0.6682101488113403, 0.19265137612819672, 0.510078489780426, -0.2631978392601013, -0.1345039308...
the namespace.
[ 0.07101601362228394, 0.21681518852710724, -0.060043852776288986, 0.08328669518232346, -0.1557176411151886, -0.00835640262812376, -0.10375281423330307, 0.17098598182201385, -0.10738513618707657, -0.5183133482933044, -0.3442785441875458, 0.05104198679327965, -0.10129673033952713, 0.394206970...
I have a loop that looks like this ``` def slow_loop(array) array.each_with_index do |item, i| next_item = array[i+1] if next_item && item.attribute == next_item.attribute do_something_with(next_item) end end end ``` aside from changing the way do\_something\_with is called, how can i make this perfo...
[ 0.3253152668476105, 0.04695438593626022, 0.16520418226718903, -0.08066031336784363, -0.034192170947790146, -0.12325747311115265, 0.5312855243682861, -0.3261026442050934, -0.2712360620498657, -0.5508244633674622, 0.16468755900859833, 0.31731629371643066, -0.3661612272262573, 0.3470998406410...
you could do this more cleanly like so: ``` array.each_cons(2) do |a, b| do_something_with(b) if a == b end ```
[ 0.1992134302854538, 0.04488981142640114, -0.07161088287830353, -0.26224374771118164, 0.04053500294685364, -0.2817681133747101, 0.17379233241081238, -0.4216320514678955, -0.19658471643924713, -0.43026214838027954, -0.24649578332901, 0.3273617625236511, -0.539693295955658, 0.0668722763657569...
The problem I have is that I have multiple submit inputs in a single form. Each of these submit inputs has a different value and I would prefer to keep them as submit. Whenever the user presses `Enter`, it is as though the topmost submit input is being pressed, and so it is causing problems for the code checking which...
[ 0.15062320232391357, 0.22781361639499664, 0.08417464047670364, 0.08997505903244019, -0.2503511309623718, 0.11888106167316437, 0.0489189513027668, -0.3883993923664093, -0.07624992728233337, -0.629935085773468, 0.3400607407093048, 0.43920567631721497, -0.061295829713344574, 0.296098589897155...
your HTML correctly ``` <input type="submit" name="action" value="Edit"> <input type="submit" name="action" value="Preview"> <input type="submit" name="action" value="Post"> ``` The `$_POST` array (or `$_GET/$_REQUEST`) will contain the key "action" with the value of the enacted button (whether clicked or not). Now...
[ 0.11428628116846085, -0.10608549416065216, 0.6203720569610596, -0.23297949135303497, -0.4188383221626282, -0.03702150285243988, 0.4119548499584198, -0.3205496668815613, -0.13808970153331757, -0.6423048377037048, -0.2515677213668823, 0.518986701965332, -0.30867817997932434, -0.3185310959815...
print_r( $_POST ); echo '</pre>'; } ?> <form method="post"> <input type="text" name="test" value="Hello World"> <input type="submit" name="action" value="None" style="display: none"> <input type="submit" name="action" value="Edit"> <input type="submit" name="action" value="Preview"> <input ty...
[ 0.0011748806573450565, 0.0578068308532238, 0.15324978530406952, -0.2186792939901352, -0.32972314953804016, 0.33269989490509033, 0.2728179693222046, -0.530875563621521, -0.1178225502371788, -0.523811936378479, -0.3732190728187561, 0.34624457359313965, -0.45117896795272827, -0.02755665779113...
> **Possible Duplicate:** > > [Is Java “pass-by-reference”?](https://stackoverflow.com/questions/40480/is-java-pass-by-reference) I found an unusual Java method today: ``` private void addShortenedName(ArrayList<String> voiceSetList, String vsName) { if (null == vsName) vsName = ""; else vs...
[ -0.2832818925380707, 0.05233783647418022, 0.3790004551410675, -0.2741546630859375, 0.02629425935447216, 0.11542460322380066, 0.4938555061817169, -0.2919293940067291, -0.3383939862251282, -0.7050487995147705, -0.06956817209720612, 0.5499276518821716, -0.13928131759166718, 0.1537811607122421...
voiceSetList.add("#" + shortenedVoiceSetName); } } ``` According to everything I've read about Java's behavior for passing variables, complex objects or not, this code should do exactly nothing. So um...am I missing something here? Is there some subtlety that was lost on me, or does this code belong on thedailyw...
[ 0.3800649344921112, -0.042307041585445404, 0.19047194719314575, -0.2050074338912964, -0.15290066599845886, -0.03275687247514725, 0.8038342595100403, -0.17575234174728394, -0.08377300947904587, -0.45634761452674866, -0.10715452581644058, 0.8637219667434692, -0.42814046144485474, -0.05112366...
void badChangeDog(Dog dog) { dog = new StBernard(); // compiles, but has no effect outside the method } ``` **Edit:** What this means in this case is that although `voiceSetList` *might* change as a result of this method (it could have a new element added to it), the changes to `vsName` will not be visible outsid...
[ 0.28698229789733887, -0.02098805084824562, 0.2569602131843567, -0.4188031852245331, 0.04770936071872711, 0.10392368584871292, 0.9132339954376221, -0.2918189465999603, -0.048368293792009354, -0.5767579674720764, -0.050517622381448746, 0.6802000403404236, -0.40966954827308655, 0.207367345690...
I'm trying to get two divs to float to opposite sides of the page, with text flowing between them. The top of the second (left-aligned) div should be even with the bottom of the first (right-aligned) div. The code below works fine in FF, Chrome, Opera, etc. fine, but they do not clear properly in IE. Both divs appear a...
[ 0.3013485372066498, -0.22881124913692474, 0.7429193258285522, -0.10178514569997787, -0.4236733913421631, 0.030993368476629257, -0.005948150996118784, -0.0706016793847084, 0.15399204194545746, -0.945931613445282, 0.14564567804336548, 0.36576512455940247, -0.13367785513401031, -0.30670386552...
speaking directly to this. **CSS** ``` div { width: 200px; margin-top: 10px; border-style: solid; border-width: 1px; position: relative; } .wrapper { width: 600px; border-color: #FF0000; } .right { float: right; border-color: #00FF00; } .left { float: left; clear: both; ...
[ -0.17246583104133606, 0.02346848137676716, 0.8033907413482666, -0.09120582789182663, -0.47004982829093933, 0.33544424176216125, 0.34603920578956604, -0.2886921465396881, 0.18838444352149963, -0.8275530934333801, -0.3712615966796875, 0.46387892961502075, 0.1481619030237198, -0.1366032809019...
Nulla pretium tempor leo. Vivamus mi risus, dapibus ac, consectetur quis, pellentesque eget, sem. </div> <div class="left"> Proin malesuada. Ut vel lorem. Cras rhoncus nisl accumsan turpis tristique consequat. Sed lacinia ligula at nibh. Morbi in quam. Morbi commod...
[ -0.45626166462898254, 0.037713561207056046, 0.24547114968299866, -0.1588059514760971, -0.044724952429533005, 0.8059251308441162, 0.6366087198257446, -0.07716567069292068, -0.04626801982522011, -0.2884443998336792, -0.24147772789001465, 0.19394171237945557, -0.1737138330936432, -0.068216450...
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla pretium tempor leo. Vivamus mi risus, dapibus ac, consectetur quis, pellentesque eget, sem. Maecenas est dui, imperdiet nec, fermentum ut, pretium a, orci. Quisque hendrerit interdum orci. Nulla sit amet risus non enim ultrices b...
[ -0.2542360723018646, 0.11801562458276749, 0.46335867047309875, -0.009717250242829323, 0.16400612890720367, 0.6203384399414062, 0.3637453019618988, -0.07431013882160187, -0.09106258302927017, -0.26583513617515564, -0.20577669143676758, 0.6263894438743591, -0.10372961312532425, -0.3235262334...