Interested in learning Direct2d to create a Windows 8 app, but after 2 hours of research I'm thoroughly confused. Samples like this (Creating a Simple Direct2D Application) seem to assume you know what an HWND and HRESULT is, and how the Windows API works in general. My question is this: do you need an understanding of the Win API, COM, OLE, and all this other Windows stuff in order to get a good grasp on Direct2d/3d? All the other barebones tutorials assume that you know all this stuff and I don't really know where to start. The startup D2D project in VS 2012 gives you a bunch of files but th
Can I get an eyeball on my symlink? I'm trying to download a file from one directory, while the file actually exists in another. I've got the actual file, and the symlink in seperate subdirectories, but both reside in the public html(both are web accessible). I've verified the file and file location on my (shared Linux) server by going to the file directly. The link is being created (I've used readlink, is_link, and linkinfo), and I can see it when I FTP in. I believe I am probably just having a misunderstanding of the directory structure. I put the file here: ./testdownload/ I put the symlink
I have an MVC3 application which uses ViewBag variables to dynamically fetch data from database and dynamically generate the interface. I am using jQuery to call action method to insert some values to the database and update a ViewBag variable accordingly. I want to refresh the div with the new ViewBag values returned after the update from server...Cant really figure how to do that. Thanks This is my View code: <div id="phys"> <fieldset> <legend>IPSS</legend> @foreach (var parameter in ViewBag.four.Parameters) { @MyHelpers.ParameterList(parameter, ViewBag.four.ParametersValues, "ParametersList
I have overridden equals in Python but I would still like to do a reference equality check. In Java, this is the difference between == and .equals. Does Python have a similar ability?
I have the following code in an iframe and I made it display in the parent but now I don't know how I can group the images like image gallery in fancybox example. I saw this in an example: $(document).ready(function() { $('.imagen').click(function(e){ e.preventDefault(); parent.$.fancybox([ {href:'images/01.jpg', title: '01'}, {href:'images/02.jpg', title: '02'}, {href:'images/03.jpg', title: '03'} ],{ // href: this.href, helpers: { overlay: {............... but I do not want that because links are going to be dynamic. I would like to use something like $(".fancybox") .attr('rel', 'gallery') a
I'm messing around with some rather low level things and trying to determine why I get different outputs with the CorFlags.exe utility. For reference, the outputs are as so: $ corflags test2.exe Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 4.0.30319.17929 Copyright (c) Microsoft Corporation. All rights reserved. Version : v4.0.30319 CLR Header: 2.5 PE : PE32 CorFlags : 0x1 ILONLY : 1 32BITREQ : 0 32BITPREF : 0 Signed : 0 $ corflags test.exe Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 4.0.30319.17929 Copyright (c) Microsoft Corporation. All rights reserved.
It is possible to do something like the screenshot below? The input is of type number, and the "px" is automatically added by the input itself (and cannot be changed).
I am working on backup/restore data from postgresql for what I use pg_dump.exe and pg_restore.exe. In order to restore backup file I have to delete actual tables in database what can be "suicidal job" if something with dumped file isn't OK. I can check dumped file for integrity with (say) '7z t mydump.gz' what I do like first test. But I would like to know, because this archive is original PG archive did PostgreSQL contain any technique to check this '.gz' archive which I can take before deleting actual tables? And if do, how to do a proper check? EDIT: This is my actual command for dumping: "
I have several PC's on each of them I set small swing application that get data with JSON request to one web server. Can I receive the data from web server without to send request to the web server, with other words can the Web server send the data without the Java application to ask for this?
I have a requirement to generate some automated mails and so I wanted to use velocity for this task.I have copied all velocity jars to the lib folder and created a hello.vm template and placed in WEB-INF/templates folder.Below is exception I am getting, org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'hello.vm' userCount incremented to :1 at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:474) at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:352) at org.apache.velocit
I've already learned bootstrap but I'm trying to learn foundation for a different project just to get some exposure to it. I'm wondering if there's any simple way to add a username/password form to the top nav bar similar to how bootstrap does? I've checked out the template called workspace here: http://foundation.zurb.com/page-templates/workspace.html and it has a search box in the top that looks very similar to what I want, but when I wrap a form around it, it goes haywire. Anybody have an idea how to do this in foundation? What I'm trying to work with: <nav class="top-bar contain-to-grid">
I am working with 960gs (in my local environment) and I insert this CSS code into my footer div: #footer { background: url(https://placehold.co/1800x130) repeat-x scroll top transparent; height: 130px; width: 100%; overflow: hidden; } <div id="footer"> <div id="nav" class="container_12"> </div> <div id="endfooter" class="container_12"> <div id="copyright" class="grid_3 alpha"> </div> <div id="design" class="grid_3 omega"> </div> </div> <!-- endfooter --> </div> <!-- end footer --> The problem is that the page does not show the footer div at full width with the background covering the entire di
I am trying to get a high level understanding of TCP and have come to a confusing point. Let's say we have a server S and a client C which are connected. If S pushes a message to C and before C realizes there was a message sent it also pushes a message towards S. Now were are in a state where S is waiting for it's message ACK and C is also waiting for it's ACK. How does the specification avoid this kind of deadlock? A lot of the resources online quickly go into specific implementation details, but I am instead trying to find a high level explanation of how these deadlocks are dealt with. (I am
I'm having trouble with an exercise asking to have a user prompt a name and echoes that name to the screen until user enters a sentinel value. I understand this is a sentinel-controlled loop but I'm stuck on the fact that I'm dealing with entering a name instead of an integer. I tried to follow a program in my book which only explains how to use a sentinel value with integers but not with String "name". I tried looking up this answer and saw something like name.equals("stop") if it even applies to this. and looked it up on the APIs and still didn't find it helpful. I would like to see how it a
I created review for development branch in phabricator, updated it several times and than pushed branch for testing. Review was not finished but phabricator automatically closed it. I can create another differential review, but all comments and updates will be in old... So is there a way to reopen closed review?
There has been an exact duplicate question as this one, but it's been 2 years, and there's only one answer which was not really a solution. I have an image (thumbnail). Right below it there are 2 buttons: View and Download. View will open the image in browser (cached). And the Download button will open the Save Image dialog. Right now I'm using PHP's header Content-Disposition: attachment; for the download button. Generally, visitors will first hit the View button to preview (thumbnail is not a solution since details and quality need to be verified), especially for my own app. Now, I don't rea
I have 2 tables with same schema on 2 different databases on the same server with SQL Server 2008 R2. One table gets updated with data more often. Now there is a need to keep these 2 table in sync. This can happen as a nightly process. What is the best methodology to achieve the sync. process ?
I have a fixed navigation bar on my website that stays at the top with links that take me to different sections further down the page. However, because my fixed nav bar has a height of 40px, the beginning 40px of every section is covered up. How would I offset where my links take me by 40px using either HTML or CSS? Thanks.
I'm using ptrace to trace the syscalls of a process. After forking the process, I use PTRACE_TRACEME to start trace the the process. The code looks like this: while (true) { int status; int gotPid; gotPid = waitpid(pid, &status, 0); if (WIFEXITED(status) || WIFSIGNALED(status)) { break; } if (WIFSTOPPED(status)) { handleTrace(); } } Then there is the handleTrace function, which looks like this. long syscall; syscall = ptrace(PTRACE_PEEKUSER, pid, 8 * ORIG_RAX, NULL); // do something with the syscall // continue program ptrace(PTRACE_SYSCALL, pid, NULL, NULL); This is all good, but if the progr
I am currently working on shopping cart.let me quick expain whats happening in product_info.php page. in product info page products information in displayed such as name,price,image etc.. i have made small functionality in this page.i have put 10 small diffrent color images below the product main image and 2 text boxes to write something on main image using php Gd. i have made ajax function which is called on onclick of image small images and on onkeyup of two text boxes with three parameter : selected color image's path and value of textboxes.Now when user will click on the one of the color i
I have created a camera app and I want my app to be turned in all 4 possible orientations and the to update the camera preview accordingly. for that I have used the following method I have copied from: Android - Camera preview is sideways public void updateCameraDisplay(int w, int h) { // set preview size and make any resize, rotate or // reformatting changes here Log.i("CameraPreviews", "Updating camera orientation with w=" + w + " and h=" + h); Parameters parameters = camera.getParameters(); Display display = getActivity().getWindowManager() .getDefaultDisplay(); int rotation = getActivity()
I want to read data frames sent by a GPS XBee protocol. The USB XStick receives the following data: CHARS : 15931 SENTENCES = 0 CHECKSUM : 58 Heading : 55 Tilt: -46 Roll:2 CHARS : .... and so on ... I can read by typing in the terminal control : $ screen /dev/ttyUSB0 I'd like to see these details in the same way, but with a program written in C. Here's what I do : #include <stdio.h> #include <stdlib.h> #include <termios.h> #include <sys/fcntl.h> #include <unistd.h> #include "serial_port.h" void read_Serial_Port(const char* DEVICE_PORT) { int file; struct termios options; char message[100]; uns
I have a strange problem with matplotlib under Eclipse I've tested this code and this works fine in the command line: import matplotlib.pyplot as plt import matplotlib.pylab as pylab plt.plot([1,2,3,4]) plt.ylabel('some numbers') plt.show() But when I execute this code under Eclipse, there is nothing shown. I see that pydev understood all my imports and there is no error message.
I am working with Coded UI automation. The issue is to customize test case execution. I cannot use TFS or Lab agent or any other tool. The test components (DLL) are executed through a customized UI developed using C# on a 64bit machine with Win7. I am able to run test case now through the code below: string str = "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\MSTest.exe"; ProcessStartInfo startInfo = new ProcessStartInfo(str); startInfo.Arguments = " /testcontainer:TestProject1.dll"; Process.Start(startInfo); But when I want to install this application to another machine
We made a solution containing a custom timer job that needs to be deployed on a server with sharepoint 2010 but without visual studio 2010. How can this be done ? I haven't find anything regarding this issue. thanks
Currently I have an Oracle chain defined with the following steps: 1) TRUE START first,second,third 2) first COMPLETED AND second COMPLETED AND third COMPLETED START A,B,C 3) A COMPLETED AND B COMPLETED AND C COMPLETED END first.sql: create materialized view first_View nologging never refresh as select * from first second.sql: create materialized view second_View nologging never refresh as select * from second third.sql: create materialized view third_View nologging never refresh as select * from third The error I receive is this: CHAIN_LOG_ID="4321", STEP_NAME="SECOND" REASON="Job slave proce
I have a raw SQL query that works, but I want to convert it to CodeIgniter's query builder methods. Raw query: SELECT online_visitors.page_id, hotels.hotel_name, COUNT(online_visitors.page_id) AS count_visit FROM `online_visitors`, `hotels` WHERE online_visitors.page_type = 'hotel' AND online_visitors.is_bot = 0 AND hotels.ID = online_visitors.page_id GROUP BY online_visitors.page_id ORDER BY online_visitors.page_id ASC My unsuccessful coding attempt which is at least missing the COUNT part: $this->db->select("page_id, hotel_name"); $this->db->from("hotels"); $this->db->join("online_visitors")
I am presently working on a new development and I really need my project to have the silky feel it requires, So I thought of using Ajax or jQuery to retrieve data from SQL Server 2008. I am new to JSON and its functions. Here is the html: Enter Employee ID <br /> <asp:TextBox ID="txtEmpId" runat="server"></asp:TextBox> <br /> <input type="button" id="BtnSearch" runat="server" value="Search" /> <div id="emp" style="display: none; margin-top: 40px"> ID:<span id="txtId"></span><br /> Title:<span id="txtTitle"></span><br /> Name:<span id="txtName"></span><br /> Department:<span id="txtDepart