Posts

Showing posts from September, 2014

Why are Python Programs often slower than the Equivalent Program Written in C or C++? -

Why does Python look slower on average than C / C ++? I learned Python as my first programming language, but I have only started with C and already I think that I see a clear difference. Python is a C-level language, which means that your statement from the computer - memory Management, pointers, etc., and allows you to write such programs as how human beings think. It is true that C code usually runs 10 to 100 times faster than the Python code. If you only evaluate execution time, however, if you also include the time of development, then the dragon is often Beats Development of time for many projects is far more important than run time performance. Long-term development time directly converts the market into additional costs, fewer features and slow speeds. The reason for this is internally that the Python code executes more slowly, because the code is compiled in a timed manner,. Other interpreting languages ​​such as Java bytecode and. NET bytecode runs faster than P

Get HTML data to program(C++) -

Hi I would like to add some functions to my app. How is it possible to obtain data from a web page? For example, I log in to webchat that IOS is https safe and now there are some tables with user replies. How to obtain tables or some other HTML component of my C ++ program is SSLed, so we do not want to breathe http. What should I do? There may be a look but it provides access to the web like a browser and afterwards You can access the elements of pages obtained in your C ++ code.

refactoring - Refactor C++ code to use a scripting language? -

Background: I'm working on a platform game The C ++ game for the months is currently fully written in C ++, though I am afraid of using Lua for enemy A and possibly some other arguments. However, this project was made without Lua, and I have already worked in AI for C ++ code. I hope Lua can improve the game's excesses, but it does not know whether to replace the current C ++ code into Lua. Question: Whenever it is appropriate to take a fully functional C ++ code and reuse it in a script language like Lua ? The question is deliberately unclear, so the free answer is not related to the given background. Scripting languages ​​are useful for things that can often change or expand, and Can afford business at speed It will not be the meaning of using a script language in your original libraries, because they are relatively static (they all do more than the content of the process) and hurry them. But for things like AI, this is an ideal idea. You can tweak AI w

c# - Loading embedded resource on Windows 7 -

I have an app that works fine on my WinXP machine. However, when I try to run it on my Win7 machine, it still fails when it tries to load an embedded resource. Resources are all (I can see them using reflectors). The rows that have failed are all forms: splash. Image = new bitmap (ContainerForm) .Assembly.GetManifestResourceStream ("SplashTest.Resources.Logo.gif")); and they all fail with the same exception: exception = 'System.ArgumentException: parameter is not valid. On the system Drawing Bitmap..cracker (stream stream) I do not understand why it is not working on my Win7 machine but it is on my normal WinXP dev machine. Any thoughts? There are not many possible failure modes: Assembly.GetManifestResourceStream () will receive zero if the resource is not found. This will fail with the exception shown by the Betamap constructor. In a bit of a bug, it was supposed to reduce the argument. Anyhoo, it seems that for some reason the assembly has no

c# - Why must initialization value of field members be determinable at compile time? -

1) Why should the initial value of the field members be compiled when compiling time? 2) But if the initial value should be determined to compile, then why am I able to start a ab field in the context of an object: class A {B b = new B (); } Class B {} thanks I'm a little cache ; There is no such rule for the field, in particular, the fields are clearly started by anyway - either by your code or by default, the only corner-contrast strategy field Initialization is understood, in which the strat is considered to be complete before all fields must be assigned. I wonder if you are talking about the "fixed assignment" of the variable in methods; I.e. zero fu () {int i; Console.WriteLine (i); // is not valid; I did not assign I = 1; Console.WriteLine (i); // value will be}} This is because the value for the method variable sometimes does not suffer from random values ​​which are taken from the stack. Indeed, an IL is marked, that means the locals

database - Android Cursor over Generic list of business objects? -

In the .NET land, I usually ask the database and archive a general list type archive. Then the app will use it. In the Android land, I am reading about DB access and I am using it in apps. Why do most docs use a cursor and use constants to use it? Is it to save resources? Is it meant to save resources? Of course. + Display The general rule is to avoid creating objects, because you are limited in memory, CPU power (and resultant battery life) and garbage collection is rather expensive.

Visual Studio Linked Files Directory Structure -

I have two versions of a project, one for Silverlight and most of the code base in the SL project for a .NET . I want to add all the files from the SL project globally to the NAT version because the associated files. I successfully did this in the CSPOZ file to do this. Managed for NET version: & lt; Compile = ".. \ MyProj.Common.SL \ ** \ * .cs" Remove = ".. MyProj.Common.SL \ Properties \ **" & gt; Unfortunately, it adds all the files to the root of my project ... so I end up with a long unreadable list of linked files in the .NET project. I really do not want to manually deal with a complete duplicate directory structure and change the directory name and change the file name and whatnot to maintain. So, there is no way to protect the visual studio when the directory structure connects to the linked files in the wildcard above? Or at least one of these links to all the linked files under one directory. Can the group create a NET project like MyPro

optimization - Fast format conversion open source library -

Can someone recommend to me the open source format conversion library? Optimized for SSE, SSE 2 Format for conversion: I420, YUY2, RGB (16-bit, 32-bit). Only found VirtualDub Kasumi library. Look at FFMPG, which is licensed under the terms of LGPL. I'm not sure if libswsccale will compile with MSVC (this would not possibly be), but you always use MSYS / Mingw to collect Libscadesell in a shared library and use it in your MSVC project. Can do to

asp.net - RSS Feed is giving error in cloud -

In my C # asp.net 3.5 application, I am using RSS feeds to get current updates of my website. . Its work is fine and when we subscribe to the feed, it also updates the data according to its requirement. Now our application has been deployed in the cloud. There too it is opening the RSS feed and showing the data. But when I say that subscribing to this feed, it indicates that there was a generalization error while giving the error page and the page can not be displayed. Find out about working with RSS feeds in the cloud environment. Check that your mime type is correct / should be application rss + xml

is XMPP still alive for iPhone? -

I want to implement chat client for iPhone using jabber / XMPP. The XMPP Framework on Google Store shows that it is being eroded. Does anyone know where the XMPP chat client starts for the iPhone? As John Parise mentioned, there is considerable active. I personally wrote two different XMPP IM clients using Framework, which are accepted and sold in the iPhone App Store. It takes some project setup to do the right thing, which you can find scattered around the linked site. For easy reference, I have summarized the required steps (after adding the XMPP framework source tree to your project): // To use the XMPP framework on iPhone / iPad, : // 1. Add libidn.a for Framework (found in Libimban folder below XMPP / Seller folder) // 2. Add // libresolv.dylib on framework 3. Add CFNetwork.framework to Framework 4. 4. SystemConfiguration.framework Add frameworks to // 5. Xxode to libxml2 To use: Add "Header Search Path" to "Other Linker Flag" with "-lxml2" /

php - Return the exact ID using fetch_assoc -

I have a small problem in my code and I need your help. Well fetch_assoc to get data from Im database And I need to get the id number of each returned value. The issue is that my code only returns the id number of the previous data here. Here is my code: Fit (PDF: FETCH_ASSOC)) {$ album_ID = $ line ['album_ID']; $ Value = $ line ['album_name']; Print "& lt; option value = ''. $ Value. '' '& Gt;" $ value. "& Lt; / Option & gt; "?}? & Gt; & lt; / select & gt; & lt; input type =" hidden "name =" album_ID "value =" & lt ;? Php print $ album_ID? I like the selected album id in the hidden input type, but it always keeps the album id of the previous data as it is. Please help. Your best bet is to give the option to the option option in the ID < / P> .... while ($ line = $ stmt -> Get (PDF :: FETCH_ASSOC)) $ {album_ID = $ line ['album_ID']; $ Valu

iphone - loading and formatting the rtf file in UIWebView -

I am trying to load the content of an RTF file in UIWebView. I have been successful in loading the content, but it is incompatible. The fonts are very large and there is no format in it, it displays the color of the RTF content, but not the font or size. So what should I do now. Is there any other way to load RTF and format it? I load the RTF in the following way: NSString * path = [[NSBundle main bundle] pathForResource: @ "Home" type: @ "RTF"]; Ns URL * url = [NSUr file URL with path: path]; NSURLRequest * req = [NSURLRequest request with url: url]; [Menuweb load request: request]; So what should I do now? Instead of using HTML, this is the only way you want control.

c# - How is method group overload resolution different to method call overload resolution? -

निम्न कोड संकलित नहीं होता है ( त्रुटि CS0123: 'System.Convert.ToString (object) 'मैच प्रतिनिधि' सिस्टम। कनवर्टर & lt; T, स्ट्रिंग & gt; ' ): वर्ग ए & lt; T & gt; {शून्य विधि (टी ओबीजे) {कनवर्टर & lt; टी, स्ट्रिंग & gt; ToString = कन्वर्ट। टॉस्ट्रिंग; // यह या तो (.NET 4 पर) काम नहीं करता है: कनवर्टर & lt; ऑब्जेक्ट, स्ट्रिंग & gt; ToString2 = कन्वर्ट.ToString; कनवर्टर & lt; टी, स्ट्रिंग & gt; ToString3 = toString2; }} हालांकि, यह ऐसा करता है: वर्ग ए & lt; T & gt; {शून्य विधि (टी ओजीजे) {// ओ टी है, और कन्वर्ट। टॉस्ट्रिंग (ओ) // स्ट्रिंग कन्वर्ट। टॉस्ट्रिंग (ऑब्जेक्ट ओ) कन्वर्टर & lt; T, string & gt; ToString = o = & gt; (ओ) Convert.ToString; }} सी # 4 में, सह / कॉन्ट्रा-वर्जन प्रतिनिधि को एक-दूसरे को सौंपा जा सकता है, और प्रतिनिधियों को सह / कॉन्ट्रा-वेरिएंट तरीके से बनाया जा सकता है, इसलिए ToString ( ऑब्जेक्ट) विधि को कनवर्टर & lt; T, string & gt; के रूप में इस्तेमाल किया जा सकता ह

gwt get array button value -

Figures and buttons are shown on each row and cola in my live project. But my button will not work properly. This is my current code: Private Button [] B = New Button [] {New Button ("A"), ..., New Button ("J"}}; Private int z = 0; ... Public Zero UpdateTabelGallery (JsArray str) {for (int i = 0; i str.length (); i ++) {b [i] .setText (str.gettitle ()); UpdateTabelGallery (str.get (i)); }} Public Zero UpdateTabelGallery (GalleryData str) {Image img = new image (); Img.setUrl (str.getthumburl ()); HTML hedges = new HTML ("a href =" + str.geturl () + ">" + img + "/ a>" + b [z]); TabelGaleri.setWidget (y, x, hedgehog); // is the right place here? B. [Jade] .addClickHandler {@ Override Public Wide OnClick Click (Event Event) {Window.lert ("I clicked the button to show the text" + B [Z] .gettext ()); }); Z ++; } I'm still confused where I should have my button handler. Clickhandler with this current code does n

Mysql data convert -

क्या ऐसा करना संभव है DATE_SUB ("। Date $।", INTERVAL 100 DAY) यदि स्तंभ का प्रकार जहां दिनांक संग्रहीत है varchar (255) है या मुझे उस कॉलम को "DATE" प्रकार में बदलने की आवश्यकता है? हां, यह संभव है कि आप अपने डेटा को yyyy-mm-dd प्रारूप में संग्रहीत करते हैं। अन्यथा आपको उसे इसे एक में बदलना होगा।

How to combine these two PHP arrays? -

I have two arrays in PHP that are part of an image management system. weighted_images A multi-dimensional array is an associative array with keys for each sub array 'weight' (for order) and 'id' (image id). The array ('weight' = & gt; array ('weight' = & gt; 'id' => 156), 784 => array ('weight' = & Gt; -2, 'id' => 784),) Image This array is user input. This is an array of image IDs. array (784, 346, 748) I want to sort them with the same array weight of the image if any image ends up to a weight Does not attach. This is not a particularly difficult problem, though my solution is beautiful and can not help thinking that is a better way of doing it. $ t_images = array (); Foreign currency ($ weighted_images $ wi) {if (in_are ($ y ['id'], $ images)) {$ t_images [$ wi ['weight']] = $ wi ['id']; }} Foreach ($ Pictures as $ images) {if ($ $ weighted_images [$ image])

c# - How to map LINQ EntitySet to List property in property setter? -

मेरे मॉडल में मुझे इन संस्थाएं हैं: सार्वजनिक इंटरफ़ेस IOrder {string name {get ; सेट;} सूची & lt; IProduct & gt; आदेश दिया गया उत्पाद linux-to-sql द्वारा उत्पन्न आंशिक कक्षा में {1} सेट करें;};}} [/ p> सार्वजनिक आंशिक श्रेणी क्रम: आईओडर [सूची & amp; IP; IProduct & gt; आदेश दिया गया उत्पाद ({return this। L2SQLProducts.Cast & lt; IProduct & gt; .toList (); } सेट {this.L2SQLProducts = ??? }}} कैसे सेटर की तरह दिखाना चाहिए? संपादित करें: इसका उद्देश्य इंटरफ़ेस है कि मैं इकाई परीक्षण के लिए मॉक कर सकता हूं या linq-to-sql को बदल सकता है 汗 了 ... 这样 不怕 性能 问题 吗? 如果 我 这样 编码 呢? var a = xx.आधारीकृत उत्पाद [0]; Var बी = xx.आधारीकृत उत्पाद [1]; 这样 不是 要 该 问 了 两次 数据库 吗? अंग्रेजी में अनुवाद करें: क्या? यह चलने पर धीमा हो सकता है। यदि मैं कोड को पसंद करता हूं: var a = xx.OrderedProducts [0]; Var बी = xx.आधारीकृत उत्पाद [1]; क्या आप डेटाबेस को दो बार एक्सेस करेंगे?

java - HttpURLConnection does not read the whole response -

I use the HttpURL connection to post HTTP, but I do not always get the full response. I wanted to debug this problem, but when I worked on every line, it used to work. I thought it should be an issue of time, so I added the thread and it actually worked my code, but it is only a temporary framework. I wonder why this is happening and how to solve it here The code is: Public static InputStream doPOST throws (string input, string inputMimeType, string URL, map & strings; string, string> httpHeaders, string expectedMimeType) MalformedURLException, IOException {URL U = New URL (URL); URL connection c = u.openConnection (); InputStream Inn = Null; String media type = null; If (c instanceof HttpURLConnection) {//c.setConnectTimeout (1000000); //c.setReadTimeout (1000000); HttpURLConnection h = (HttpURLConnection) c; H.setRequestMethod ("Post"); //h.setChunkedStreamingMode(-1); SetAccept (h, expected MimeType); H.setRequestProperty ("content-type", input meme ty

How to reparent a Cocoa window? -

I need to host my window on the window of the second window. How do I calculate windows of any other Cocoa app? Is it possible to control them? If not: How can I attract a window to another application? Thanks! How to calculate windows of any other Cocoa app? You can calculate the windows of any other application using the Accessibility API. Is it possible to control them? Here, whether indirectly, whether the application is cocoa (or carbon using standard controls) is more accurate, this is the case if the application is accessible. It is usually possible to move, switch, or control the controls in other windows (such as press buttons) with simple things. It is not possible to tap any one of your tapes in one of the windows. You have to follow your location and other moves when your window needs to be moved. This method is not possible after a live drag. If not: How can I attract a window to another application? You can draw only in your windows. You can

spring - How To Replace @Resource Annotation with Java 1.4 Compliant Version -

I have a test class that has a @ resort annotation for a setter and I need to make it Java 1.4 compliant So, obviously annotation should go, I'm using Spring. So, how do I change something like @resource ("my.resource") so that the setter gets the right dependency injection? Do I need to create bean in an XML file? I am very new to this so that if I do not provide enough information, then tell me if you are in the environment of Java 1.4 then you can not trust annotations because you already mention it correctly. Have been. You will have to declare the definitions of dependencies and bean within your XML document, which configures your spring conversion. & lt; Bean id = "myBeanName" class = "my.package.myClass" & gt; & Lt ;! - Bean in the injection property in other - & gt; & Lt; Property name = "property name" ref = "other bean" /> & Lt ;! - Inject property - Prices in other properties - &

version control - How to "revert" unchanged files with mercurial? -

I have installed Windows 7 on my computer, and I have to change all the permissions / ownership - which apparently But "All touched" files, and now everything seems "modified" (when I do "Hg status"), but only a few files have a real change. Can I run an order so that I return "" or "Back to all the files" which do not have any real change (i.e. the text is unchanged even if the file attributes have changed). Added: I upgraded from WinXP to Win7; I did not really do anything "duplication", the repository was the same on disk .... After the upgrade, I did not have access to some files, I needed to "take ownership" to gain access (in some way the user rights were not well protected). Here's what I get: $ hg stat ../../test/acceptance/spidermonkey/js1_5/String/regress-179068.as M $ Hg diff ../../ Test / accept / spiderman / js1_5 / string / regress 179068.s I think You have failed to copy the re

java - package is not found, even though it's in both build classpath and runtime classpath -

I am unable to compile a Java program because some of the imported packages are not available even though they are both in build classpay and Runtime classpath The picture below shows the problem I have highlighted the Gatata-Media package in Eclipse. It matches the first compilation error. Click for full size What am I doing wrong? Are you using your code to compile? Do you have something like this - CP or post-address? Make sure that the Junk file containing the YouTube Upgrade class is part of that -clippass parameter. You can find more information about setting up CLASSPATH. If you do not explicitly specify Classpath, then it reads from the JavaScript CSSSPAT environment variable Why can not you just launch the app from the app as it is compiled there?

r - ggplot2 footnote -

What is the best way to add a footnote to the bottom of the plot created with ggplot2? I have tried to use the ggplot2 annotated function as a combination of the logic noted here. p + annotate ("text", label = "footnote", x = unit ( 1, "NPC") - unit (2, "mm"), y = unit (2, "mm"), bus = c ("right", "bottom"), gp = gpar (cex = 0.7, col = Gray (.5))) But I'm getting the error in "as.data.frame.default (x [[i]], alternate = TRUE, stringfactors = stringsfactors : Operation can not be class c ("unit.arithmetic", "unit") in any data.frame ". I will use something like this: pdf (" filename.pdf ", width = 10, height = 6) # Print the appropriate graphics device (P) MefootNot () uses (grid.exe from the webpage above; ggplot2 is based on grid) dev.off ()

benchmarking - How to benchmark functions in Clojure? -

I know that the function can take time to evaluate the time function / macro on screen / stdout. The time gives the value of the macro evaluation function, which makes it great to use inline though I want to automatically scale runtime in specific circumstances. Is there a function that gives time spent in some libraries to help with this benchmarking? From README: P> Criterion measures the calculation time of an expression. This includes: Statistical processing of several evaluations < Designed to allow JIT compiler to customize its code The accuracy of GC prior to testing, to isolate time from GC state before testing a The final forced GC after the trial to estimate the effect of cleaning on time results

scripting - How to get Command history by cursor key in Linux tclsh -

In TCL Shell (texlsh) you can get command history using the cursor keys (like up arrow key). I'm running tclsh on Fedora with Linux version 2.6.21. If you want to access the Readline Library, you can: $ rlwrap tclsh Useful options are -c file name completion, and -f from a file To add to the completion list: $ rlwrap-cf my_complete_file tclsh Because you almost always use rlwrap Want to add a shell nickname is useful: alias tclsh = 'rlwrap tclsh'

In Mercurial (hg), how do you see a list of files that will be pushed if an "hg push" is issued? -

We can see all the changes and files included by using hg outgoing-v But file names are scattered in the list of all changes. Is there a way to see a list of all the files, which is issued HG push ? First of all, create a file with this content: Changeset = "{files}" file = "{file} \ n" Assuming you get it out-of-the-box. The test is called and put it in your home directory. You can then give this command: hg -q outgoing --style ~ / out-style.txt | Sort-U

c++ - Linker warnings when using stdscr (ncurses) -

OK, so whenever I try to use stdscr in pdcurses, I get these warnings: / P> link: warning LNK4098: default Lib "LIBC" conflict with the use of other lbs; Use / NODEFAULTLIB: Library LINK: Warning LNK4049: Locally defined symbol "_stdscr" imported LINK: Warning LNK4049: Locally defined symbol "_p" imported How do I fix it? They are just warnings, but when I run my program, it crashes, so they have something to do with it, especially considering the fact that the crash that it crashes is that which is stdscr Uses ... You usually see that when you have programming libraries in MSVC Which are manufactured in a different RTL model. Look in "Compiler Options", perhaps under "Code Generation". You should be able to get runtime library settings. It can talk about debug / multithread / single ... Make sure that the runtime library settings for your program matches you settings for all the libraries this problem Should take

c++ - Life Scope of Temporary Variable -

#include & lt; cstdio & gt; #include & lt; स्ट्रिंग & gt; शून्य मज़ा (const char * c) {printf ("- & gt;% s \ n", c); } Std :: string get () {std :: string str = "हैलो वर्ल्ड"; वापसी str; } Int main () {const char * cc = get ()। C_str (); // सीसी इस बिंदु पर मान्य नहीं है जैसा कि यह // अस्थायी स्ट्रिंग आंतरिक बफर की ओर इशारा करता है, और अस्थायी स्ट्रिंग // पहले से ही इस बिंदु पर नष्ट कर दिया गया है। मज़ा (सीसी); // लेकिन मुझे आश्चर्य है कि यह कॉल वैध परिणाम देगा। // ऐसा लगता है कि लौटा अस्थायी स्ट्रिंग // के दायरे में वैध है (...) // मेरी समझ क्या है, गुंजाइश का मतलब है {...} // क्या यह मान्य व्यवहार गारंटी सी ++ मानक है? या यह आपके कम्पाइलर विक्रेता कार्यान्वयन पर निर्भर करता है? मज़ा (मिल () c_str ()।); getchar (); } आउटपुट है: - & gt; - & gt; हैलो वर्ल्ड हैलो, क्या मैं जानता हूँ कि सही व्यवहार सी ++ मानक की गारंटी है, या यह आपके कंपाइलर विक्रेता लागूकरण पर निर्भर करता है? मैंने VC2008 और VC6 के तहत इसका परीक्षण किया है। दो

app store - "The item you tried to buy is no longer available" storekit error in iphone sdk -

I am trying to use StoreKit API in iPhone for OS3.0 in app purchases. However, I'm having the following error while trying to buy something in SANDBOX environment. The item you tried to buy is no longer available [Environment: Sandbox] The code here I use to pay: SKPayment * Payments = [Product Identifier with SK payment payment: model.productId]; [[SKPMentQueue Default Qu] Ad Payments: Payment]; I have also inquired about the storekit for the list of available products and it seems that I return the same product identifier which I am now using to buy items. I have all the product setups in iTunes Connect and have created a test user. Before debugging the app, I signed out of the store in the settings menu and entered my test account and password when debugging my own app. What's going on here? Yes, it appears that apple problem was working perfectly on my sandbox app yesterday. not today.

JQuery invert table selection -

मेरे पास ऐसा पृष्ठ हिस्सा है & lt; div id = "inbox" & gt; & Lt; h1 & gt; शीर्षक & lt; / h1 & gt; & Lt; p & gt; पहला पैराग्राफ & lt; / p & gt; & LT; तालिका & gt; & LT; tbody & gt; & LT; टीआर & gt; & Lt; td & gt; तालिका सामग्री & lt; / td & gt; & Lt; / टीआर & gt; & Lt; / tbody & gt; & Lt; / तालिका & gt; & Lt; p & gt; दूसरा पैराग्राफ & lt; / p & gt; & Lt; / div & gt; मैं #inbox डिवा के भीतर सबकुछ को एक हेन्डलर असाइन करना चाहता हूं जो टेबल के एक भाग (एक बच्चे) नहीं है मैंने ऐसा कुछ करने की कोशिश की $ ('# inbox: नहीं (: है (टेबल))')। क्लिक करें (फ़ंक्शन () {चेतावनी ('हैलो इनबॉक्स');}); लेकिन वह काम नहीं कर रहा है, तो मैं #inbox के अंदर तालिका का चयन कैसे करूं? प्रयास करें .. $ ('# inbox तालिका')। भाई बहन ()। पर क्लिक करें (फ़ंक्शन () {चेतावनी ('हैलो इनबॉक्स') ;}); ('तालिका *, तालिका')। क्लिक

html - CSS conditional comments for other Browsers except IE? -

So far I know, conditional comments are only supported for different versions of IE. Lukeway, we can also provide conditional commentary for other browsers. If so, how? If not, what could be the best option? Check I use it on my site, you basically just write css and tell that you Which goal would you like to target? I use it on my site and it works great! Hope it helps.

many to many - django manytomany filter question -

grass, I have a model that looks like this class person (models.Model): name = models.CharField (empty = wrong, max_length = 100) friend = model. ManyToManyField ('self', empty = true, zero = true) < I tried people_with_friends = person.objects.filter (friends = true) thanks What about it? people_in different friends = person.objects.exclude (friend = none)

windows - Monitoring UDP socket in glib(mm) eats up CPU time -

I have a GTKmm Windows application (built with Minzid) which gets UDP packet (no send) . The socket is the original winsock and I use the glibmm IOChannel to connect to the main loop application. The socket is read from Revoft. My problem is this: This setup accounts 25% percent CPU time on a 3GHz workstation. Can anyone tell me? In this case the application is inactive, and if I remove the UDP code, the CPU usage goes up to almost zero as the application has to perform some CPU intensive tasks, I spend 25% of the image Here are some code excerpts: (sorry for printf;)) / * Tie * / Zero UDPInterface :: BindToPort (unsigned mini port) {struct sockaddr_in target; WSADATA wsaData; Target.sin_family = AF_INET; Target.sin_port = htons (port); Target.sin_addr.s_addr = 0; If (WSAStartup (0x0202, and wsaData)) {printf ("WSAStartup failed! \ N"); Exit (0); // :) WSACleanup (); } Sock = socket (AF_INET, SOCK_DGRAM, 0); If (maus == INVALID_SOCKET) {printf ("illegal sock

ruby - How do I fix this NameError? -

I want to use value v inside an example method on a particular object's meta : v = ParserMap [kind] [: verification] # We want to use this value later. S = ParserMap [kind] [: specs] const_set (name, lambda {p = parser.new (s) # this line is a new area ... class Unfortunately, the class keyword starts a new field, so I lose old scope and given a name to me. Okay? change class with class Will return, so that you can call it at class_eval . The block given to class_eval will then implement in the context of the metaCLAS (as it was before), but a new area Without starting.

html - Absolute positioned div jumps outside containing div in IE7 -

There is a problem with some performance issues in IE 7. First of all, my large text headers also display in the far off Internet Explorer (all pages), secondly, my details on my portfolio pages end with their respective divisions. Works great on FF / Chrome / Opera / Safari! You will see what I mean: (I have used a little bit, so I do not see questions from my mouth when someone visits my website). I have not googled extensively that the problem is number 2 overflow problem, or there is a full bug situation in IE. Here the center has CSS with jumbo-text title for omelet column 1 {padding: 103px 10px 10px10px; Swim left; Width: 500px; Margin: 0; } and for details div on the portfolio page .porttxtbox {text-align: right; Background-image: url (image / porttact bg ..png); Bottom: 0; Status: Completed; Width: 100%; Padding: 0 pixels; Margin: 0 px; } and its container divas .portimgbox {padding: 0px; Margin: 0 px; Height: 250px; Width: 480px; Status: Relative; Li

iis 7 - IIS7 or .Net 301 Redirects from 1 domain to another -

I have 2 domains for the question, I will call them www.old.com and www.new.com Both URLs are pointing to the same IIS7 site example. I need to raise it so that when someone goes to www.older.com, they are redirected to www.new.com 301. The hard part is that I am rewriting the URL for the pages of the site. Then redirect to www.old.com/about.aspx www.new.com/ To work with the IIS 7 URL rewrite rules also means that www.new.com/About.aspx www.new.com Is redirected to /. This is fine and there is no big deal. My issue is how do I redirect the main domain without having to rewrite the URL from the main domain? I do not care if I use a module inside IIS7 or if I want to do it in the .NET code. I think I'll use a rewrite module for something like this. Actually it is saying that if your new domain is not going, then redirect it to it. Pass URL which will be left by your custom research module & lt; Rewrite & gt; & Lt; Rules & gt; & Lt; Rule name = &q

bash - recursive directory svn move shell script -

I want to rename all nested directories named "foo" for "bar" - I do the following fun Have tried: search * / -name 'foo' | Xargs svn move {} 'bar' \; thanks to move each Foo will try to pwd / bar and pass svn move lots of logic. Here's what I'll do: find -depth -type d -name 'foo' -print | While reading; Do echo svn mv $ REPLY `dirname $ REPLY` / bar; Done You can actually remove echo to perform the operation. The above works under this assumption that you do not have free space in file names.

mingw - "Malformed version number string mingw32" when starting rails -

My OS: Windows XP, ruby: 1.8.7, Rail: 2.3.5 Everything Okay, but I have just installed "gcc-4.4.0-mingw32-bin", and to run gem installed rdiscount , then my rail can not start. Now when I run Ruby Script / Server , or Rock Gems: Install , the following error will occur: < Code> Rack aborted! Distorted version number string mingw32 (see full trace by working with --trace) e: \ WORKSPACE_TOPCODER \ wenda_ror> ruby ​​script / server = & gt; Mongrel = Booting> Http://0.0.0.0:3000 E: /Ruby/ruby-187/lib/ruby/site_ruby/1.8/rubygems/version.rb: Rails starting at 182.3.5 Applications: 'Start In: Distorted Version Number String E: / RUB / RUB 187 / LB / RUB / GMGS / 1.8 / GEMS / RIS-2.3.3 / LIB / ARIANS / VENDOR_GAME_SSOURS_Intix. RB: 105: In 'New' from E: / Ruby / Ruby-187 / BB / Rabbi / Gems / 1.8 / Gems / Rail -2.3.5 / Leib / Rail / Seller- Gm_Source_index RB: 105: In 'Version_for_dir' from E: / Ruby / Ruby-187 / Leib / Ruby / Gems /

sql - Delete where not in query -

I have a lookup table ( ## lookup ). I know this is a bad design because I'm repeating the data, but it increases my quotes very much. I have a query that populates this table. ## , Separate Call 1, Cola 2, ... Join the Table 1 ... Join ... etc ... in ... I would like to emulate this behavior: Remove deleted search ## from deleted ## ######################## ..ETC ... This will update the table correctly but it is very easy to insert and delete. It messes with my indexes and locks the table to choose. This table can also be updated as something like: remove from removing from ## Separate call 1, cola 2, ... select table1 ... join ... etc ...) ## Enter in Lookup (except for separate call 1, cola 2, ... from Table 1 ... Add ... etc.) if this table Already, so on the other hand it may take more time, but I can say "with a lock" and I will be able to select from the table. Any ideas about how to write a query in another way? Delete LU # to ## Look Lu

sql - Dates that intersect -

I am researching this problem for a while and I can not come for a solution, hopefully Here's some help. Currently, I am working with Microsoft SQL Server Management, I am trying to do the following: First, the old inquiry will only return the results The last question in two dates is: SELECT e.Name, o.StartDate, o.EndDate to dbo.Name E, dbo.Date o where e.Name = o Name and o Start date & lt; = '2010-09-28 23:59:59' and Oandet & gt; = '2010- 9-28 00:00:00' and E. As a name 'A' Example table that is prepared after query (The real table is more clearly rows: P): Start Name A 2010-09-28 07:00: 00 2010-09-28 17:00:00 A 2010-09-28 13:45:00 2010-09-28 18:00:00 A 2010- 09-28 08:00:00 2010-09-28 16: 00: 00 A 2010-09-28 07:00:00 2010-09-28 15:30:00 Although we need to change it, so the query does the following: Find the intersection dates for one day that are searched for the dates that are not the difference I do a day x I have found

uri - WPF MediaElement Natural Duration -

I have a media element that I set my source in a new URI based on a valid string. For example: MediaElementName.Source = new URI ("string"); The string is a valid path, and after debugging, sometimes it sets the NaturalDuration of "MediaElementName" I now at least with the result of any work Googling for 2 hours has gone .. Anyone here has an idea why sometimes it will set naturalness, and sometimes it does not happen? I am able to play Wave, but do not know how long wav file (time duration) Any help or thought is appreciated, thanks! - BTG I know that it is very late but then Also my experience is in two forms of this problem. a) The codec (flac can be an example of this) can not know the duration. Check and see if the windows media player is showing the progress bar (I had this problem in some flax files being created by custom frame) I suspect there was no "index" inside the file. Apart from this, the Flax format gives different

How to tell MATLAB to open and save specific files in the same directory -

I have to run an image processing algorithm on a number of images in a directory. Code> name_typeX.tif , so there are different types of images for the given name. Image processing algorithm takes an input image and output an image result. I have to save this result as name_typeX_number.tif , where number is also an output from the algorithm given image < P> Now .. How do I tell MATLAB to open a specific typeX file? Also keep in mind that there are other non-TIF files in the same directory. How to save the result as name_typeX_number.tif ? The result can be saved in a single directory where input images are present. How do I tell MATLAB to treat the results that are saved as input images? I have to run it as a background code on the server ... so no user input is allowed. It seems that you want to get all the files in a directory, whose name is a certain format , Then process them automatically You can do this by using the function to get a list o

html - Specifying the width and text alignment of a column -

Is it possible to specify the width of the table column in percentages using CSS? Is it possible to specify the text alignment of a specific column as well? For example, I have a table with 3 columns. I would like to say col1.width = 20% col2.width = 40% col3.width = 40% col1.text-align = left; Col2.text- align = right; Col3.text-align = center; Regarding the first question: make the sections that you send to each Umn Rather simple The alignment of the text is a bit more difficult, because you can only specify as a whole. In this case, a solution would be to use the nth-child pseudo-class, but it is a CSS 3 feature that does not work in an existing version of Internet Explorer. As a proposal, you can use columns related to style in the + combination. This is a CSS 2.1 feature. & lt ;! DOCTYPE html & gt; & Lt; Top & gt; & Lt; Meta charset = UTF-8 & gt; & Lt; Title & gt; Column styling & lt; / Title & gt; & Lt; Style &am

SVN - Skipped paths -

I got a message when I started an SVN UP: dropped 'trunk / Script /accountability_survey_report.php '1585 on amendment. Summary of conflict: paths omitted: 1 I am trying to understand what it means and how to solve it. I tried to delete the file and then only SVN again, but I get the following: restoration 'trunk / script / accountability_survey_report.php' left trunk / script / accountability_safety_report.fp ' Revised 1585. Summary of conflicts: Paths omitted: 1 Any help is appreciated. I have seen the message "path left" when I merged the copy of the work last and Then it was returned then the file is added to the first merge, but when you do not take a working copy back, the second merge tries to add the file, but it stops because the file already exists.

seo - Best methods to make urls friendly? -

We are working to modify the URL structure for some of our movie content, but we are not exactly sure at all The way to handle strange characters is, for example, '303/302' '8 1/2 woman' 'Man, where is my car?' '9 1/2 weeks' So far, we are thinking: / movies / 303-302 / movies / 8-1- 2 - Women / movies / dude-wheers-my-car / movies / 9-1-2-weeks Is this the best solution? Are we forgetting anything? Use this format: / movies / 123456/8 -1-2-women Set up your web server so that the movies can be identified with the numerical ID (123456), and the remaining route is ignored (only works for SEO) (Stackhouse Flow uses this approach)

richfaces - Forcing a save as dialogue from any web browser from JSF application -

इस सवाल का पहले से ही एक उत्तर है: < / P> 3 जवाब मेरे पास एक मॉडल है जो दिखाया जा सकता है और फिर मेरे पास एक निर्यात बटन है, जिसे बचाने संवाद को ऊपर लाया जाना चाहिए, अगर मैंने h उपयोग किया है: कमान बटटन, सत्यापन जांच को नजरअंदाज कर दिया गया है, लेकिन अच्छी तरह से काम करता है। यदि मैं a4j: commandButton का उपयोग करता हूं, तो मान्यताओं को पूरी तरह से किया जाता है लेकिन मैं फ़ाइल को सहेजने में नहीं देखता हूं। क्या कोई मुझे मदद कर सकता है। धन्यवाद मैं रिचफेसेस नहीं करता, इसलिए मैं सिर के ऊपर से नहीं बता सकता, लेकिन मुझे यह सीखता है कि a4j: html कॉमांड लिंक मदद कर सकता है यदि ऐसा होता है और आप एक बटन चाहते हैं, तो कुछ सीएसएस को फेंक दें ताकि लिंक को एक बटन जैसा दिख सके।

c# - Entity Framework query builder methods: why "it" and not lambdas? -

I am just starting with EF and I have a strange question like a string in an odd form: var departmentQuery = schoolContext.Departments.Include ("Course"). OrderBy ("it.Name"); Specifically, what sticks to me is "this name." When I was tuing around with LINQ from SQL, query-builder queries can be very much specified in each filter with lambda, like, in this case, d => d.Name. I see there are overrides of orderbars that take longitude which returns an iDardDevelopable or iOrdedNAnBible, but there is clearly no required execution method to achieve those object results, after which There may be a database in it. It seems strange to me all I have read how lambda is such a big deal for such things, and their expression has been translated into trees and then in a target language - me Why is it necessary to use "it.Name"? I get a long expression with me; What can I do (this is some property == 1) ... do you have a system Linux as a

BitBucket Wiki: Create a hierarchy structure? -

I want to create a hierarchy in my wiki like: normal FooPages Foo1 Foo2 Foo3 ODP Bar Falcon I would like to create these pages, and & lt; & Lt; Toc & gt; & Gt; would like to use content macros. How can I do this? Do I need to edit clone and wiki on my machine, or can I do this via web interface? You can (partially) do this, & lt; & Lt; Toc / & gt; & Gt; By using this, there will be a TOC for all the headers in files in the root directory. This will not list the header in the file in the sub directory, though. You can also go to & lt; & Lt; Toc FooPages / & gt; & Gt; etc. can also do this. You can do this on your web interface and locally on your machine. I gave some TOC examples on this Bitbucket wiki page. You can see the markup there. Make sure you balance the same mark on the header; Use == H2 == instead of == H2 . Both are valid, but at this time, the latter will be & lt; & Lt; Toc & gt; &am

android - Is there a faster way to download a page from the net to a string? -

I have tried other ways to download information from a URL but need a fast one. I need to download and pars 250 different pages, and want that the app does not appear to be ridiculously slow. This code is currently being used to get a page, no insight would be great. try {url = myURL = new URL ("http://www.google.com"); URLConnection ucon = myURL.openConnection (); InputStream inputstream = ucon.getInputStream (); Buffetfindeinputstream buffedinputstream = new buffer inputtop (inputstream); Byterebrafer bytererefresh = new byterebarfter (50); Int current = 0; While ((current = bufferedInputStream.read ())! = -1) {byteArrayBuffer.append (byte)); } TempString = New String (ByterebarFoot.to Batteryre); } Hold (exception e) {Log.i ("error", estosting ()); } If the connections are on the same server then try to open the connection as well Try to avoid re-regulation in Buffer, and read as much as possible at a time. const int APPROX_MAX_PAGE_SIZE = 300; Tr

math - How would someone implement mathematical formulae in Java? -

How will implement a mathematical formula in Java? What do I mean, the user uses the string with multiple variables like the simple verb formula: x ^ 2 + 5x + 10 or in Java: (Math.pow (x, 2)) + (x * 5) + 10 . The user will enter into that and then the solution for the program x will be solved. I am using the interpreter class to interpret the string as an equation. But how do I solve for x? This is a difficult problem, as long as you have yourself a simple equation Wikipedia page > Traveling through another link, I saw 3 open-source Java systems.

Created C header file, getting errors -

I'v created a C header file (it is compiled), now when I compile my program it is Errors like: WARNING: Error ignoring zero character (s): '\ 23' TheFunctions.h: 1722 stranded in the program: Error: The program '\ 200' / P> The header file inside is just two functions, which works in the normal program. Please help! It looks like you are trying to include a precompold header directly (a binary file) Are there. When you include files via pre-processor statement, they are text files, files are not compiled. Edit (We now know that the compiler is this): I do not have the question that the GCC header header contents are answer Is not well enough to know, but this is a link about things that are worth it:

css3 - CSS - Overlapping divs -

I have no code to get started. I want to add overlapping two divs on one another then use the new CSS3 rotate function. Requirements I do not want to use images I Completed in the center Aligning the thing should be easy (which makes the situation difficult to use: complete;) This content is going to be below the boxed material (which makes the situation difficult to use: absolute;) If it is possible without too much situation: absolute; It is better. I prefer table free solutions. Have fun! How do I come here: If JSField does not work in the future, then here's the source: css # paper {width: 570px; Minimum-height: 300px; Swim left; Background: #fff; Conviction (-2deg) to rotate; -mose-transforms: to rotate (-2deg); -WebKit-Transform: to rotate (-2deg); -o-results: to rotate (-2deg); Z-index: 2; -Moz-Box-Shadow: 0 0 10px #DDD; -WebKit box-shadow: 0 0 10px #CCC; Box-Shadow: 0 0 10px #CCC; Border: 1 px solid # DDD; } #page {padding: 20px 0 20p

java - JSF2 set a UISelectItem to not render. With a custom MenuRenderer -

I have a managed vane that contains a collection of UISelectItem instances. How can I tell an example to render? selectitem.setRendered (incorrect) set still renderes to that item ... I want to manipulate UiSelectItem frequency. So basically I have a h: selectOneMenu which is populated by this collection by f: selectItems . But I do not want to show some of these items. Thanks Update: It seems that the provided field is inherited by the UICP Portable but it does not have any functionality. Trying to combine the custom menu renderer with an extended UISelectitem that has a disabled field. I know this is not a direct answer to your question, but perhaps disabling the item for you will suffice? It seems that you could (I have not tried to do this): & lt; F: selectItem item is disabled = "true" ... />

windows mobile - Image Size With J2ME on an HTC Touch2 -

I have to find out that there is a limit on the use of the camera in the J2MM implementation on HTC Touch 2. The original camera is 3mp, but it shows that the quality is significantly reduced when accessed via J2MA, in fact this is the only size and format capable of returning the .getSnapshot () method to 240x320 pixels Jpeg . I am trying to confirm that this is a limitation if J2me implementation and not my coding. I've tried some things to hear and examples: Private zero show cameramos (try {mPlayer = Manager.createPlayer ("capture: // video"); // mPlayer = Manager.createPlayer ("Capture: // Video Encoding = RGB 565 and width = 640 and height = 480"); MPlayer.realize (); MVideoControl = (videocontrol) mPlayer.getControl ("VideoControl"); Canvas = new camera canvas (this, mVideoControl); Canvas.addCommand (mBackCommand); Canvas.addCommand (mCaptureCommand); Canvas.setCommandListener (this); MDisplay.setCurrent (canvas); MPlayer.start (); } Hol

android - Synchronization in Robotium -

How long does it wait to show a new activity? Is it possible to set timeout manually for solo instances? What do you want for that time? If you want to wait to show new activity, you can use it: getInstrumentation (). WaitForIdleSync (); But since you are using I think they already do this for you.

php - How can I remove a key and its value from an associative array? -

एक साहचर्य सरणी को देखते हुए: array ("key1" = & gt; "value1" , "Key2" = & gt; "value2", ...) कुंजी को देखते हुए मैं एक निश्चित कुंजी-मूल्य जोड़ी को हटाने के बारे में कैसे जाउंगा? आप उपयोग कर सकते हैं: unset ($ array ['key-here']); उदाहरण: $ array = array ("key1" = & gt; "value1", "key2" = & gt ; "मूल्य 2"); print_r ($ सरणी); सेट नहीं ($ सरणी [ 'कुंजी 1']); print_r ($ सरणी); सेट नहीं ($ सरणी [ 'कुंजी 2']); print_r ($ सरणी); सरणी ([key1] = & gt; मान 1 [key2] = & gt; मान 2) अर्रे ([ Key2] = & gt; मान 2) सरणी ()

flash - As3 City Simulation Game Engine -

I am planning to create a Flash AS3 game that is similar to SIMCT or something like Facebook game Any good AS3 game engine ?? I am not planning to create multiplayer games, only a single player, and the player can load and save the city. The player has to meet a certain objective (like 20 years) within a time limit. Apart from this, each building has different sizes (like 1x2, 2x2) so that the engine should know which tile has been captured. The map will have 10x10 size, so I do not have to worry about performance. I have seen Fluxel but the game gallery does not look so promising. Any suggestions on flashpunk and pushbutton looks interesting? If you really want to make this game bigger, then I will give you the top of your own Engine. 'Game' is not so specific, so we can create a game engine like Fluxel. I will see it / it is a good Iometric library for 3.

Reload activity in Android -

क्या Android में गतिविधि को पुनः लोड करने का एक अच्छा अभ्यास है? यह करने का सबसे अच्छा तरीका क्या होगा? this.finish और फिर this.start गतिविधि गतिविधि के साथ आशय ? आप बस का उपयोग कर सकते हैं finish (); startActivity (getIntent ()); अपने भीतर से एक गतिविधि ताज़ा करने के लिए।

VSS causing crash in VS 2008 -

We use Visual Studio 2008, with Visual Source Safe V8. Recently, I am getting more accidents than ever, mainly when viewing history (comparison, etc.). I have captured a screen of the series of dialog boxes that will always be visible, for the accident: Do anyone know what this can be? Thank you. Have you analyzed against the VSS database? Whenever you get a Visual Studio crash, there may be database corruption in VSS, an analysis is going on, and then perhaps a repair can solve the problem.

c# - Marshal.ReleaseComObject(...) issues -

I asked to release some Excel objects after use. Is it necessary to set references to zero later (like in the following code)? var dateCol = sheet1.get_Range ("C4", "C" + offset off); DateCol.NumberFormat = "Text"; Marshal.ReleaseComObject (dateCol); DateCol = null; This is what I always use and it works very well using Excel = Microsoft.Office.Interop.Excel; Excel.ApplicationClass _Excel; Excel.WorkbookWB; Excel.Worksheet WS; Try {_Excel = New Microsoft.Office.Interop.Excel.ApplicationClass (); WB = _Excel.Workbooks.Open ("FILENAME", Type Missing, Type Missing, Type Missing, Type Missing, Type Missing, Type Missing, Type Missing, Type Missing, Type Missing, Type Missing, type missing, type missing, type missing, type missing); // do something} grip (ex before) {WB.Close (wrong, type messing, type missing); throw; } Finally {GC.Collect (); GC.WaitForPendingFinalizers (); System.Runtime.InteropServices.Marshal.FinalReleaseComObject

php fetch user data from mysql -

मेरे पास वर्तमान में एक MySQL डेटाबेस में 2 तालिकाओं हैं। संरचना: संदेश आईडी | सामग्री | User_id | समय submesages आईडी | उपसंकेत | Msg_id | User_id | समय submesages तालिका में, कॉलम msg_id एक विदेशी कुंजी है, id कॉलम में संदर्भित है तालिका संदेश । अब मुझे php से पूछना चाहिए $ cur_userID = $ user- & gt; current_id; // वर्तमान उपयोगकर्ता आईडी SELECT * संदेशों से WHERE आईडी & gt; '{$ _GET [' id ']}' // समस्या यहाँ मैं submesages तालिका के लिए कैसे पूछूं? अन्य उपयोगकर्ताओं द्वारा पोस्ट किया गया था - वर्तमान उपयोगकर्ता को पेश किया जा रहा है? user_id के बराबर $ cur_userID को प्रदर्शित नहीं किया जाना चाहिए। धन्यवाद। आप submessage विवरण प्राप्त करना चाहते हैं, है ना? यह क्वेरी संदेश तालिका से सभी जानकारी प्राप्त कर लेगी, साथ ही उप संदेश के प्रत्येक के सभी जानकारी। इस प्रकार जुड़ें लेकिन इसमें उप-संदेश (उत्तर?) शामिल हैं, जो कि संदेश के रूप में समान उपयोगकर्ता_आईडी (प्रश्न?) हैं। SELECT M। * Sm। * संदेश से इनर में शामिल हों s

Visual studio 2008 Debugger command line arguements -

मेरे पास डिबगिंग में निम्न है | कमान तर्क - एक start.ini> c: \ temp \ a.out तर्क के रूप में 3 है, लेकिन मेरे collegues मशीन में से 5 में से एक है- ऐसा लगता है कि रीडायरेक्शन ऑपरेटर को एक के रूप में लिया जाता है अपने बॉक्स पर arguemtnt क्या यह तय करने के लिए कोई भी सेटिंग है? "डिबगिंग | कमान आर्गुमेंट्स" परियोजना की सेटिंग में पुनर्निर्देशन समर्थन था किसी बिंदु पर विजुअल स्टूडियो में टूटा हुआ है, लेकिन मुझे यकीन नहीं है कि वास्तव में जो रिलीज़ हो () के लिए। मैंने स्केचिस जानकारी से पाया है, ऐसा लगता है कि यह वीएस 2005 हालांकि काम किया था। VS2008 के कुछ संस्करणों / रिलीज़ (लेकिन हो सकता है कि सभी अपडेट न हो) में तोड़ा गया, और वे वीएस -2010 में काम कर रहे हैं। आप यह सुनिश्चित करना चाह सकते हैं कि आप और आपका सहयोगी एक ही संस्करण को विजुअल स्टूडियो सेवा पैक)। "डीबगिंग | कमांड आर्गुमेंट" सेटिंग में रीडायरेक्शन VS 2010 के साथ मेरे लिए अभी ठीक काम कर रहा है।

Scrum and motivation -

When it comes to making work time, how can you prevent the Dev team from pading their numbers? Vs P> Whenever we will reduce the scope, quality or increase the resources The foundation is trusting the best method But why do not you put them in the first place? If you think that they are not for work, then it is not better to start the project because it is almost certainly unsuccessful for failure - either because you are right and the team is a group of inept developers, or because you Wrong, but lack of trust and more control makes the team scope and in reality their commitment and enthusiasm worsens. OTOH If you are sure that you have made the best available to the people, and that they are talented and motivated, then best give them a good challenge, let them work and all Try to overcome obstacles. In most of my experience, most developers start with enthusiasm and are motivated to create products that they can be proud of. However, impossible timelines,

php - Mod_Rewrite: Testing URL got indexed in Google - How do I create a proper 301 redirect? -

I worked on a website for which I had a "development URL" that looked something like this: www.example.com.php5-9.dfw1-2.example.com / Now, several weeks after the start of the website, at least one of the content The page is indexed on Google with that URL Question: How can I redirect all requests from that test URL to route the actual domain again? For example, I want to: www.example.com.php5-9.dfw1-2.example.com/page-name To go to: www. Example.compage-name The website is powered by WordPress and is hosted on the PHP server. I have experimented with .htaccess without success. If www.example.com be the only valid host name on your server You can use this rule to emphasize this host name: RewriteCond% {HTTP_HOST}! ^ (Www \ .example \ .com |) $ rewrite% {HTTPS} s ^ s (s) | RewriteRule ^ http% 1: //www.example.com% {REQUEST_URI} [L, R = 301] Otherwise try redirecting this rule to this specific host name: Revoked% {HTTP_HOST} = www.exam

does Entity framework support user defined functions as scalar properties -

I would like to include the value of a scalar function as a unit's read-only property, because it is included Could that value be possible in a filter? To define a solution such as the following sample: & Lt ;! - SSDL content - & gt; & Lt; EntitySet name = "Emp" EntityType = "TestModel.Store.Emp" & gt; & Lt; Defining System & gt; EMP & lt; / DefiningQuery & gt; Select EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO, dbo.MyFunc (DEPTNO) & amp; as LM with DMM; / EntitySet & gt; & Lt; EntityType name = "Emp" & gt; & Lt; Key & gt; & Lt; PropertyRef name = "EMPNO" /> & Lt; / Key & gt; & Lt; Property Name = "EMPNO" type = "int" Nullable = "false" /> ... & lt; Property Name = "DNAME" type = "varchar" MaxLength = "20" /> & Lt; / EntityType & gt; ... & lt ;! - CSDL content - &

c++ - Do I have to bind a UDP socket in my client program to receive data? (I always get WSAEINVAL) -

मैं एक यूडीपी सॉकेट ( AF_INET , SOCK_DGRAM , < कोड> IPPROTO_UDP ) के माध्यम से और इस सॉकेट पर recvfrom करने की कोशिश कर रहा है, लेकिन यह हमेशा -1 देता है और मुझे WSAEINVAL (10022) मिलता है। क्यों? जब मैं बाँध () बंदरगाह, ऐसा नहीं होता है, लेकिन मैंने पढ़ा है कि यह क्लाइंट की गर्तिका को बांधने के लिए बहुत लंगड़ा है। > मैं अपने सर्वर पर डेटा भेज रहा हूं, जो जवाब देता है, या कम से कम, करने की कोशिश करता है। इंक :: आंकड़े सिकुनेशन :: _ रिक्वेडाटा (एसकोडर * एडर, एसटीडी :: स्ट्रिंग और स्ट्रडाटा) {Int ret; // वापसी कोड int len; // डेटा से लंबाई int; // आकारफ (सॉकड्रर) चार * बफर; // डेटा को पकड़ेंगे c; // संदेश की लंबाई की लंबाई fromlen = sizeof (sockaddr); रेट = रिकवफॉर्म (एम_ इनसाकॉक, एंड सी, 1, 0, एडीआर, और सेलेन); यदि (ret! = 1) {#ifdef __MYDEBUG__ std :: stringstream ss; एसएस & lt; & lt; WSAGetLastError (); संदेश बॉक्स (NULL, ss.str ()। C_str (), "", MB_ICONERROR | MB_OK); #endif वापसी इंक :: ERECV; } ... यह एक काम उदाहरण है जिसे मैंने कुछ पल

undefined BIO_new_socket function in OpenSSL library -

I have the following problem with some problems (yes, I know that this is a bad document, One of my project codes (written in o, tested on OS X and in Ubuntu): Undefined symbols: "_BIO_new_socket", referenced from : _main in ccG3cvyw.o ld: symbol (s) not found collect2: ld 1 exit status I have problems with SSL library Actually, because I forgot to link my program to openssl libraries, the above undefined still stands. My compile line is: GCC-O test_app test_app.c -lssl version I use: (GCC ) 4.2.1 OpenSSL 0.9.8 L5 November 2009 I'm sure this is a (linked) library problem, because SSL function works SSL_set_bio () as it does not produce A build error). Any clue has been highly appreciated :) Chuck The library I was looking for was crypto. D'oh! Solution: add-lcrypto to gcc line

grails question (sample 1 of Grails To Action book) problem with Controller and Service -

I'm doing Grails for action one for the Action Sample until I started working with the services By then everyone was just fine when I run the app. I have the following error: groovy.lang.MissingPropertyException: For any such property: quoteService class: qotd.QuoteController $ _closure3.do qotd on call .QuoteController (QuoteController.groovy: 14) qotd.QuoteController $ _closure3.doCall (QuoteController.groovy) at java.lang.Thread.run (Thread.java:619) Here's my Groovie quoteService class, which package Qotd class quoteService {boolean behavior = getRandomQuote def (false) {error is all error within the definition of quote.list (GetStaticQuote (error: error unable to resolve Groovy class quote)) if def delivers randomQuote = (allQuotes .size ()> 0) {def randomIdx = new random (.) NextInt (allQuotes.size ()) randomQuote = allQuotes [randomIdx]} else {randomQuote = getStaticQuote ()} return randomQuote} def getStaticQuote () {new Quote (Author: "Anonymous&qu

C++ initializing constants and inheritance -

I want to start stability in the child class, instead of the base class. And use it to get rid of the dynamic memory allocation (I know that there is already size size, and there will be some child classes with different constants). So I try: class A {public: const int x; A (): X (0) {} A (int x): x (x) {} zero F () {double y [is-> x]; }}; Class B: A {B (A): A (2) {}}; Very simple, but the compiler says: Error C2057: Expected Stable Expression How can I say the compiler, is it really a constant? This is not a stable though. It can still be modified by the constructor. There is a continuous allowance of only one array size compile time . When the compiler says "continuous expression", then it does not mean the expression, which gives a constant value, but a constant, such as "52" or "45" or something along those lines Use instead. Edit: "I know that there is already size shape, and there will be child-squares with a different