im tyring to get this to work:
#define UNICODE
#define _UNICODE
#include <wchar.h>
int main()
{
wprintf(L"Hello World!\n");
wprintf(L"£?, ?, ?!\n");
return 0;
}
using visual studio 2008 express (on windows xp, if it matters).
when i run this from the command prompt (started as cmd /u which is supposed to enable unicode ?) i get this:
C:\dev\unicodevs\unicodevs\Debugunicodevs.exe
Hello World!
-ú8
C:\dev\unicodevs\unicodevs\Debug
which i suppose was to be expected given that the terminal does not have the font to render those.
but what gets me is that even if i try this:
C:\dev\unicodevs\unicodevs\Debugcmd /u /c "unicodevs.exe output.txt"
the file produced (even though its UTF-8 encoded) looks like:
Hello World!
壓
the source file itself is defined as unicode (encoded in UTF-8 without BOM).
the compiler output when building:
1------ Rebuild All started: Project: unicodevs, Configuration: Debug Win32 ------
1Deleting intermediate and output files for project 'unicodevs', configuration 'Debug|Win32'
1Compiling...
1main.c
1.\main.c(1) : warning C4005: 'UNICODE' : macro redefinition
1 command-line arguments : see previous definition of 'UNICODE'
1.\main.c(2) : warning C4005: '_UNICODE' : macro redefinition
1 command-line arguments : see previous definition of '_UNICODE'
1Note: including file: C:\Program Files\Microsoft Visual Studio 9.0\VC\include\wchar.h
1Note: including file: C:\Program Files\Microsoft Visual Studio 9.0\VC\include\crtdefs.h
1Note: including file: C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h
1C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used
1Note: including file: C:\Program Files\Microsoft Visual Studio 9.0\VC\include\crtassem.h
1Note: including file: C:\Program Files\Microsoft Visual Studio 9.0\VC\include\vadefs.h
1Note: including file: C:\Program Files\Microsoft Visual Studio 9.0\VC\include\swprintf.inl
1Note: including file: C:\Program Files\Microsoft Visual Studio 9.0\VC\include\wtime.inl
1Linking...
1Embedding manifest...
1Creating browse information file...
1Microsoft Browse Information Maintenance Utility Version 9.00.30729
1Copyright (C) Microsoft Corporation. All rights reserved.
1Build log was saved at "file://c:\dev\unicodevs\unicodevs\unicodevs\Debug\BuildLog.htm"
1unicodevs - 0 error(s), 3 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
any ideas on what am i doing wrong ?
similar questions on ST (like this one: http://stackoverflow.com/questions/787589/unicode-hello-world-for-c) seem to refer to *nix builds - as far as i understand setlocale() is not available for windows.
i also tried building this using code::blocks/mingw gcc, but got the same results.
Is it possible to make agile work for platform development? Picture a set of dev pods each responsible for a unique functional area of a platform. Now picture 2-4 app dev teams that use the platform to build software apps to the public. How do you make agile work in this scenario?
When attempting to use HttpWebRequest to retrieve a page from my dev server, I get a web exception:
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel." The remote certificate is invalid according to the validation procedure...
The url I'm attempting to read from is a plain-old http://myserver.com/mypage.asp - no SSL. The production server has a valid certificate so this shouldn't be an issue, but our dev server doesn't.
Help!
hi friends
I use the following command to find under /var some param in my script
grep -R "param" /var/* 2/dev/null |grep -wq "param"
my problem is that: after grep find the param in file
grep continue to search until all searches under /var/* will completed
How to perform stop immediately after grep match the param word
For example when I run the:
grep -R "param" /var/* 2/dev/null |grep -wq "param"
grep find the param after one second.
But grep continue to sears other same param and its take almost 30 seconds
How to stop the grep immediately after param match?
THX
I'm setting up a proper dev environment for my client (dev/qa/stage/prod). I'd like to find a way to export reports so we can cleanly move from one environment to the next. Custom RDL type reports are easy (just import the RDL in the next environment), but the reports that are built inside CRM don't appear to export anywhere. Am I missing something? Is this another feature that was missed?
Apperciate the help.
hi m very new to java and Linux i have a code which is taken from examples of jcuda.the code is following
import jcuda.CUDA;
import jcuda.driver.CUdevprop;
import jcuda.driver.types.CUdevice;
public class EnumDevices {
public static void main(String args[]) {
//Init CUDA Driver
CUDA cuda = new CUDA(true);
int count = cuda.getDeviceCount();
System.out.println("Total number of devices: " + count);
for (int i = 0; i < count; i++) {
CUdevice dev = cuda.getDevice(i);
String name = cuda.getDeviceName(dev);
System.out.println("Name: " + name);
int version[] = cuda.getDeviceComputeCapability(dev);
System.out.println("Version: " + String.format("%d.%d", version[0], version[1]));
CUdevprop prop = cuda.getDeviceProperties(dev);
System.out.println("Clock rate: " + prop.clockRate + " MHz");
System.out.println("Threads per block: " + prop.maxThreadsPerBlock);
}
}
}
I'm using Ubuntu as my operating system i compiled it with following command
1:-javac -cp /home/manish.yadav/Desktop/JCuda-All-0.3.2-bin-linux-x86_64 EnumDevices
i got following error
error: Class names, 'EnumDevices', are only accepted if annotation processing is explicitly requested
1 error
i don't know what is the meaning of this error.what should i do to compile the program
than i changed the compiling option which is
javac -cp /home/manish.yadav/Desktop/JCuda-All-0.3.2-bin-linux-x86_64 EnumDevices.java
than i got following error
EnumDevices.java:36: clockRate is not public in jcuda.driver.CUdevprop; cannot be accessed from outside package
System.out.println("Clock rate: " + prop.clockRate + " MHz");
^
EnumDevices.java:37: maxThreadsPerBlock is not public in jcuda.driver.CUdevprop; cannot be accessed from outside package
System.out.println("Threads per block: " + prop.maxThreadsPerBlock);
^
2 errors
Now I'm completely confused i don't know what to do?
how to compile this program ?
how to install the jcuda package or how to use it ?
how to use package which have only jar files and .so files and the jar files don't having manifest file ?
please help me
I'm trying to resize an ext4 filesystem on a Fedora 11 box.
Using fsdisk and lvm, I was able to grow the partition and
logical volume containing the filesystem.
When I try to run resize2fs on the device containing the
filesystem (/dev/sda2 in this case), I get:
"Device or resource busy while trying to open /dev/sda2,
Couldn't find valid filesystem superblock"
I've tried this from a rescue disk that doesn't have the filesystem
mounted, no joy.
Maybe resize2fs doesn't know about ext4?
Sorry for the newbie question, but I have the following query that groups parking spaces by their garage, but I can't figure out how to iterate the data in the view. I guess I should strongly type the view but am a newbie and having lots of problems figuring this out. Any help would be appreciated.
Public Function FindAllSpaces() Implements ISpaceRepository.FindAllSpaces
Dim query = _
From s In db.spaces _
Order By s.name Ascending _
Group By s.garageid Into spaces = Group _
Order By garageid Ascending
Return query
End Function
The controller is taking the query object as is and putting it into the viewdata.model and as stated the view is not currently strongly typed as I haven't been able to figure out how to do this. I have run the query successfully in linqpad.
I've got a Python module which is distributed on PyPI, and therefore installable using easy_install. It depends on lxml, which in turn depends on libxslt1-dev. I'm unable to install libxslt1-dev with easy_install, so it doesn't work to put it in install_requires. Is there any way I can get setuptools to install it instead of resorting to apt-get?
I've got two hard disks in my computer, and have installed Solaris 10u8 on the first and Opensolaris 2010.3 (dev onnv_134) on the second. Both systems uses ZFS and were independently created with a zpool name of 'rpool'.
While running Solaris 10u8 on the first disk, how do I mount the second ZFS hard disk (at /dev/dsk/c1d1s0) on an arbitrary mount point (like /a) for diagnostics?
I am doing some benchmarking on EXT4 performance on Compact Flash media.
I have created an ext4 fs with block size of 65536. however I can not
mount it on ubuntu-10.10-netbook-i386. (it is already mounting ext4 fs with 4096 bytes of block sizes)
According to my readings on ext4 it should allow such big block sized
fs. I want to hear your comments.
root@ubuntu:~# mkfs.ext4 -b 65536 /dev/sda3
Warning: blocksize 65536 not usable on most systems.
mke2fs 1.41.12 (17-May-2010)
mkfs.ext4: 65536-byte blocks too big for system (max 4096)
Proceed anyway? (y,n) y
Warning: 65536-byte blocks too big for system (max 4096), forced to continue
Filesystem label=
OS type: Linux
Block size=65536 (log=6)
Fragment size=65536 (log=6)
Stride=0 blocks, Stripe width=0 blocks
19968 inodes, 19830 blocks
991 blocks (5.00%) reserved for the super user
First data block=0
1 block group
65528 blocks per group, 65528 fragments per group
19968 inodes per group
Writing inode tables: done
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
root@ubuntu:~# tune2fs -l /dev/sda3
tune2fs 1.41.12 (17-May-2010)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: 4cf3f507-e7b4-463c-be11-5b408097099b
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index
filetype extent flex_bg sparse_super large_file huge_file uninit_bg
dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 19968
Block count: 19830
Reserved block count: 991
Free blocks: 18720
Free inodes: 19957
First block: 0
Block size: 65536
Fragment size: 65536
Blocks per group: 65528
Fragments per group: 65528
Inodes per group: 19968
Inode blocks per group: 78
Flex block group size: 16
Filesystem created: Sat Feb 5 14:39:55 2011
Last mount time: n/a
Last write time: Sat Feb 5 14:40:02 2011
Mount count: 0
Maximum mount count: 37
Last checked: Sat Feb 5 14:39:55 2011
Check interval: 15552000 (6 months)
Next check after: Thu Aug 4 14:39:55 2011
Lifetime writes: 70 MB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: afb5b570-9d47-4786-bad2-4aacb3b73516
Journal backup: inode blocks
root@ubuntu:~# mount -t ext4 /dev/sda3 /mnt/
mount: wrong fs type, bad option, bad superblock on /dev/sda3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Hello, newbie developer here.
There's this small problem I always encounter. Every time I try to change browser resolution (or what do you call the event when you scroll the mouse wheel while pressing ctrl), some elements (Mostly form elements) get to be shifted down or somewhere else, which does not conform with the original positioning. Im not sure if the problem is with the CSS or the markup itself and Im not really sure if this is much of a problem. Should I ignore it? (It doesn't feel very comfortable though, thinking that it might become problematic in the near future) Otherwise, any solution on how to avoid this?
Simple explanations are very much appreciated, Thanks.
(Perhaps the used term newbie should be replaced with noob?. Haha.)
Is there any existing software which can help enforce code review process like below:
Dev user commit their changeset with proper comments, but the changeset does not goes into subversion repository directly, it will be pending in a "review software".
Reviewer can see all pending changesets in the "review software", review the changeset and decide whether to allow the change into the code trunk.
The dev user will receive notification either his changeset was accepted and merged into code trunk, or was rejected.
I'm experitmenting with the Twitter API (OAuth). I have a test bed that can tweet from my dev box, but fails in production. I get a status code of 424 returned when trying to tweet.
I can't spot the difference between my live environment and my dev environment so really need to understand what a '424' is, but can find no documentation relating to it.
I have a web app that is using the 3.5 framework. I wanted to know how can I detect what webhost is rendering the page.
If the server is localhost, then send email notification to [email protected]
If the server is QA, then send email to [email protected]
Thanks
I apologize in advance for the "newbie" nature of this question.
Here is my predicament: I'm brand new to android and developing in general. I'm using android's SDK with eclipse Galileo. I've followed several tutorials to create different layouts. I've even learned recently how to use radio buttons and verify which ones were selected. Now I need to create a service that downloads and updates an xml file within the application. I've tried to locate a simple tutorial for services on Google's developer site but so far, so bad. If they exist could somebody point me in the right direction?
On the other hand, I've been told Google's tutorials are a little out dated. Is that true? If so, are there any other tutorials that would hand-hold (and possibly over-explain) how to use a service to a true newbie for free (like google)?
Any suggestions would be appreciated.
Hi,
I just downloaded SpringSource Tool Suite, and tried to generate a demo application using roo, but i'm getting error below
Code:
Created /home/dev/springsource/workspace/demo/pom.xml
Undo create /home/dev/springsource/workspace/demo/pom.xml
Invalid dependency scope: PROVIDED
[Timer-0] NullPointerException at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:84)
What is the problem? is this Maven issue?
Using: Ubuntu 8.10, SpringSource Tool Suite Version: 2.3.3.M1, Roo 1.1.0.M1, Apache Maven
Thanks
How can I reliability detect whether my Azure application is running in development fabric and not in 'the cloud' ?
RoleEnvironment.IsAvailable is true for both. I want something that is true in only one case.
I'm asking this because I want users of my library to be able to use my library for free in dev fabric. Hence manually putting seperate identifier or flag in config file and keeping two configs for dev and deploy is not feasible.
Hi volks,
I copied my sources from my lokal dev (everything works fine) to my repository and from there I did a checkout on my remote dev.
Now when I try to build everything I get this error:
devel:/var/www/myproject# ./symfony
doc:build-model
doctrine generating model classes
file+ /tmp/doctrine_schema_48726.yml
Warning:
file_get_contents(/var/www/myproject/lib/model/doctrine//base/BaseAdvert.class.php):
failed to open stream: No such file or
directory in
/var/www/myproject/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildModelTask.class.php
on line 77
Do you know what the problem could be?
Thx for your answers :)
I am at present developing a mvc4 project that comunicates to a set of wcf services. I am setting such up in tfs build for a team of developers.
I am very much a newbie to fxcop and code analysis in general. I am currently researching it and have some questions following this:
Is it recommended to use the rules that come with fxcop?
Should it be included as a build task during builds?
What is the value from it?
Are there guidelines to what rules to abide by or is it best to go with the default?
Is it correct to run the analysis as a post build event?
I am a newbie to fxcop and would like some feedback. I am as it is integrating stylecop in to my build.
g++ compiler complains about conversions between related types (from int to enum, from void* to class*, from const char* to unsigned char*, etc.). Compiler handles such convertions as errors and won't compile furthermore. It occurs only when I compile using Dev-C++ IDE, but when I compile the same code (using the compiler which Dev-C++ uses) such errors (even warnings) do not appears.
How to mute errors of such types?
I am writing a utility to audit the configuration of a WCF service. In order to properly pass credentials from the client, thru the WCF service back to the SQL back end the domain account used to run the service must be configured in Active Directory with the setting "Trust this user for delegation" (Properties - "Delegation" tab).
Using C#, how do I access the settings on this tab in Active Directory. I've spent the last 5 hours trying to track this down on the web and can't seem to find it.
Here's what I've done so far:
using (Domain domain = Domain.GetCurrentDomain())
{
Console.WriteLine(domain.Name);
// get domain "dev" from MSSQLSERVER service account
DirectoryEntry ouDn = new DirectoryEntry("LDAP://CN=Users,dc=dev,dc=mydomain,dc=lcl");
DirectorySearcher search = new DirectorySearcher(ouDn);
// get sAMAccountName "dev.services" from MSSQLSERVER service account
search.Filter = "(sAMAccountName=dev.services)";
search.PropertiesToLoad.Add("displayName");
search.PropertiesToLoad.Add("userAccountControl");
SearchResult result = search.FindOne();
if (result != null)
{
Console.WriteLine(result.Properties["displayName"][0]);
DirectoryEntry entry = result.GetDirectoryEntry();
int userAccountControlFlags = (int)entry.Properties["userAccountControl"].Value;
if ((userAccountControlFlags & (int)UserAccountControl.TRUSTED_FOR_DELEGATION) == (int)UserAccountControl.TRUSTED_FOR_DELEGATION)
Console.WriteLine("TRUSTED_FOR_DELEGATION");
else if ((userAccountControlFlags & (int)UserAccountControl.TRUSTED_TO_AUTH_FOR_DELEGATION) == (int)UserAccountControl.TRUSTED_TO_AUTH_FOR_DELEGATION)
Console.WriteLine("TRUSTED_TO_AUTH_FOR_DELEGATION");
else if ((userAccountControlFlags & (int)UserAccountControl.NOT_DELEGATED) == (int)UserAccountControl.NOT_DELEGATED)
Console.WriteLine("NOT_DELEGATED");
foreach (PropertyValueCollection pvc in entry.Properties)
{
Console.WriteLine(pvc.PropertyName);
for (int i = 0; i < pvc.Count; i++)
{
Console.WriteLine("\t{0}", pvc[i]);
}
}
}
}
The "userAccountControl" does not seem to be the correct property. I think it is tied to the "Account Options" section on the "Account" tab, which is not what we're looking for but this is the closest I've gotten so far.
The justification for all this is: We do not have permission to setup the service in QA or in Production, so along with our written instructions (which are notoriously only followed in partial) I am creating a tool that will audit the setup (WCF and SQL) to determine if the setup is correct. This will allow the person deploying the service to run this utility and verify everything is setup correctly - saving us hours of headaches and reducing downtime during deployment.