Search Results

Search found 67 results on 3 pages for 'evgeny makarov'.

Page 3/3 | < Previous Page | 1 2 3 

  • Conditionally set a column to its default value in Postgres

    - by Evgeny
    I've got a PostgreSQL 8.4 table with an auto-incrementing, but nullable, integer column. I want to update some column values and, if this column is NULL then set it to its default value (which would be an integer auto-generated from a sequence), but I want to return its value in either case. So I want something like this: UPDATE mytable SET incident_id = COALESCE(incident_id, DEFAULT), other = 'somethingelse' WHERE ... RETURNING incident_id Unfortunately, this doesn't work - it seems that DEFAULT is special and cannot be part of an expression. What's the best way to do this?

    Read the article

  • Script SQL Server login with Windows authentication without machine name

    - by Evgeny
    I want to write a SQL 2005 script to create a new login that uses Windows authentication. The Windows user is a local account (not a domain one). A local account with the same name exists on many SQL Server machines and I want to run the same script on all of them. It seemed simple enough: CREATE LOGIN [MyUser] FROM WINDOWS However, that doesn't work! SQL returns an error, saying Give the complete name: <domain\username>. Of course, I can do that for one machine and it works, but the same script will not work on other machines.

    Read the article

  • Progressively stream the output of an ASP.NET page - or render a page outside of an HTTP request

    - by Evgeny
    I have an ASP.NET 2.0 page with many repeating blocks, including a third-party server-side control (so it's not just plain HTML). Each is quite expensive to generate, in terms of both CPU and RAM. I'm currently using a standard Repeater control for this. There are two problems with this simple approach: The entire page must be rendered before any of it is returned to the client, so the user must wait a long time before they see any data. (I write progress messages using Response.Write, so there is feedback, but no actual results.) The ASP.NET worker process must hold everything in memory at the same time. There is no inherent needs for this: once one block is processed it won't be changed, so it could be returned to the client and the memory could be freed. I would like to somehow return these blocks to the client one at a time, as each is generated. I'm thinking of extracting the stuff inside the Repeater into a separate page and getting it repeatedly using AJAX, but there are some complications involved in that and I wonder if there is some simper approach. Ideally I'd like to keep it as one page (from the client's point of view), but return it incrementally. Another way would be to do something similar, but on the server: still create a separate page, but have the server access it and then Response.Write() the HTML it gets to the response stream for the real client request. Is there a way to avoid an HTTP request here, though? Is there some ASP.NET method that would render a UserControl or a Page outside of an HTTP request and simply return the HTML to me as a string? I'm open to other ideas on how to do this as well.

    Read the article

  • Flex Drawing Library

    - by Evgeny Nacu
    Do you know any simple drawing libraries with align support (one component to other, also align to grid) I would like to implement simple editor of wall configuration in the apartments, by the way. Or, may be, there is no such component and is better to use Graphics class?

    Read the article

  • Escape SQL "LIKE" value for Postgres with psycopg2

    - by Evgeny
    Does psycopg2 have a function for escaping the value of a LIKE operand for Postgres? For example I may want to match strings that start with the string "20% of all", so I want to write something like this: sql = '... WHERE ... LIKE %(myvalue)s' cursor.fetchall(sql, { 'myvalue': escape_sql_like('20% of all') + '%' } Is there an existing escape_sql_like function that I could plug in here? (Similar question to How to quote a string value explicitly (Python DB API/Psycopg2), but I couldn't find an answer there.)

    Read the article

  • Linux script to kill process listening on a particular port

    - by Evgeny
    I have a process that listens on a TCP port (?0003). From time to time it crashes - badly. It stops working, but continues hogging the port for some time, so I can't even restart it. I'm looking to automate this. What I do right now is: netstat -ntlp |grep -P "\*\:\d0003" To see what the PID is and then: kill -9 <pid> Does anyone have a script (or EXE for that matter) that would link the two steps together, ie. parse the PID from the first command and pass it to the second?

    Read the article

  • Why does Windows Explorer search freeze when I have an unrelated program paused in a debugger

    - by Evgeny
    While debugging my program, whether it's an ASP.NET application or a .NET console EXE and I have the debugger paused at a breakpoint I try to find a file in Windows Explorer. Either pressing WinKey+F or selecting search from the context menu freezes Windows Explorer - until I resume the program being debugged. My program has nothing to do with Windows Explorer! In fact, this happens in Visual Studio 2008 even with the simplest console EXE (WriteLine and ReadLine). I can't repro it with this simple EXE in WinDbg, but it does happen in with WinDb debugging an ASP.NET app. Why does this happen and how do I fix it? It's bloody annoying, especially when you don't realise what's going on. This is on Windows XP x64 SP2, running a .NET 3.5 application.

    Read the article

  • JQuery conflict with body onload event.

    - by Evgeny
    Strange conflict in my code. I have function that called from body onload: var someGlobalVar=new SpecialType(); function OnBodyLoad() { someGlobalVar.Bind(); } but when i include JQuery 1.4.2 to my project i have error that someGlobalVar is undefined. Why global variable now is undefined and what ways to fix it?

    Read the article

  • WCF + json. WCF response invalid not expected string.

    - by Evgeny
    I have configured wcf service and method which return some structure. The problem that all symbols in response '\' begins with '/' Example: [ { "rel":"http:\/\/localhost:3354\/customer\/1\/order", "uri":"http:\/\/localhost:3354\/customer\/1\/order\/3" }, { "rel":"http:\/\/localhost:3354\/customer\/1\/order", "uri":"http:\/\/localhost:3354\/customer\/1\/order\/5" }, { "rel":"http:\/\/localhost:3354\/customer\/1\/order", "uri":"http:\/\/localhost:3354\/customer\/1\/order\/8" } ] And i return only http:\localhost:3354\customer\1\order ! Why that symbols added and how can i remove them?

    Read the article

  • Fragment savedInstanceState is always null (Android support lib)

    - by Evgeny Egorov
    I wrote a simple test project, but I cant understand why I always receive savedInstanceState = null in lifecycle methods onCreate, onCreateView and onActivityCreated. I change the screen orientation, see the log, but state not saved. Tell me please where is my mistake. Thanks. The code of fragment class is: public class TestFragment extends Fragment { private String state = "1"; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (savedInstanceState != null) { //never works state = savedInstanceState.getString("state"); } //always prints 1 Toast.makeText(getActivity(), state, Toast.LENGTH_SHORT).show(); return inflater.inflate(R.layout.fragment_layout, container, false); } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putString("state", "2"); Log.e("", "saved 2"); } }

    Read the article

  • How to set PATH to another variable value with spaces in Windows batch file

    - by Evgeny
    I've got a Windows batch script issue that I'm bashing my head against (no pun intended). The problematic script looks like this: if defined _OLD_VIRTUAL_PATH ( set PATH=%_OLD_VIRTUAL_PATH% ) When I run it and _OLD_VIRTUAL_PATH is set I get: \Microsoft was unexpected at this time. _OLD_VIRTUAL_PATH is a variable that was originally set from PATH and it contains spaces - I'm pretty sure that's the problem. But what's the solution? It runs successfully if I enclose it in quotes, but I don't think the entire value of the PATH variable is supposed to be in quotes.

    Read the article

  • How to null a translation in in gettext system?

    - by Evgeny
    Suppose a simple phrase "In" in English needs to be interpreted as "" - empty string in Russian. Is is possible to specify that in the .po file? What normally happens if you set msgstr "" - you'll get the untranslated key, but I want to get nothing in that specific case. Here is a use case: I have underneath a search bar a set of buttons to select questions (for a Q&A site) from particular scopes - like so: (in English) In: [all] [unanswered] [my own] (in Russian I want) [???] [??? ???????] [???] It just sounds more natural. Yes I can leave out In for english, but I don't want to and I do not want to put button (things in [] are buttongs) html into the 'po' file. Thanks!

    Read the article

  • Best way to send floating point numbers from .NET to Java and back

    - by Evgeny
    I'm writing a .NET application that will make an RPC call to a Java application (via a message queue). The data sent in both directions will be large arrays of floating-point numbers. What is the best way to serialize them to send them across the wire? I'd like something more compact than text, but architecture-independent as the server may not be an x86 machine. The Java application can be changed as needed.

    Read the article

  • Wpf. Chart optimization. More than million points

    - by Evgeny
    I have custom control - chart with size, for example, 300x300 pixels and more than one million points (maybe less) in it. And its clear that now he works very slowly. I am searching for algoritm which will show only few points with minimal visual difference. I have link to component which have functionallity exactly what i need (2 million points demo): http://www.mindscape.co.nz/demo/SilverlightElements/demopage.html#/ChartOverviewPage I will be grateful for any matherials, links or thoughts how to realize such functionallity.

    Read the article

  • asp.net RequiredFieldValidator with custom control.

    - by Evgeny
    I have custom control with asp textbox inside. And i need to Validate by RequiredFieldValidator my custom control on CLIENT side. I added attribute to custom control class: [ValidationProperty("Text")] public class WatermarkTextBox : System.Web.UI.UserControl { } It looks like working but it always make submit to server. How can i check it only on client side?

    Read the article

  • MySQL Connect 9 Days Away – Optimizer Sessions

    - by Bertrand Matthelié
    72 1024x768 Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Following my previous blog post focusing on InnoDB talks at MySQL Connect, let us review today the sessions focusing on the MySQL Optimizer: Saturday, 11.30 am, Room Golden Gate 6: MySQL Optimizer Overview—Olav Sanstå, Oracle The goal of MySQL optimizer is to take a SQL query as input and produce an optimal execution plan for the query. This session presents an overview of the main phases of the MySQL optimizer and the primary optimizations done to the query. These optimizations are based on a combination of logical transformations and cost-based decisions. Examples of optimization strategies the presentation covers are the main query transformations, the join optimizer, the data access selection strategies, and the range optimizer. For the cost-based optimizations, an overview of the cost model and the data used for doing the cost estimations is included. Saturday, 1.00 pm, Room Golden Gate 6: Overview of New Optimizer Features in MySQL 5.6—Manyi Lu, Oracle Many optimizer features have been added into MySQL 5.6. This session provides an introduction to these great features. Multirange read, index condition pushdown, and batched key access will yield huge performance improvements on large data volumes. Structured explain, explain for update/delete/insert, and optimizer tracing will help users analyze and speed up queries. And last but not least, the session covers subquery optimizations in Release 5.6. Saturday, 7.00 pm, Room Golden Gate 4: BoF: Query Optimizations: What Is New and What Is Coming? This BoF presents common techniques for query optimization, covers what is new in MySQL 5.6, and provides a discussion forum in which attendees can tell the MySQL optimizer team which optimizations they would like to see in the future. Sunday, 1.15 pm, Room Golden Gate 8: Query Performance Comparison of MySQL 5.5 and MySQL 5.6—Øystein Grøvlen, Oracle MySQL Release 5.6 contains several improvements in the query optimizer that create improved performance for complex queries. This presentation looks at how MySQL 5.6 improves the performance of many of the queries in the DBT-3 benchmark. Based on the observed improvements, the presentation discusses what makes the specific queries perform better in Release 5.6. It describes the relevant new optimization techniques and gives examples of the types of queries that will benefit from these techniques. Sunday, 4.15 pm, Room Golden Gate 4: Powerful EXPLAIN in MySQL 5.6—Evgeny Potemkin, Oracle The EXPLAIN command of MySQL has long been a very useful tool for understanding how MySQL will execute a query. Release 5.6 of the MySQL database offers several new additions that give more-detailed information about the query plan and make it easier to understand at the same time. This presentation gives an overview of new EXPLAIN features: structured EXPLAIN in JSON format, EXPLAIN for INSERT/UPDATE/DELETE, and optimizer tracing. Examples in the session give insights into how you can take advantage of the new features. They show how these features supplement and relate to each other and to classical EXPLAIN and how and why the MySQL server chooses a particular query plan. You can check out the full program here as well as in the September edition of the MySQL newsletter. Not registered yet? You can still save US$ 300 over the on-site fee – Register Now!

    Read the article

< Previous Page | 1 2 3