Daily Archives

Articles indexed Thursday October 31 2013

Page 7/18 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Solution with multiple projects and (GitHub) single issue tracker and repository

    - by Luiz Damim
    I have a Visual Studio solution with multiple projects: Acme.Core Acme.Core.Tests Acme.UI.MvcSite1 Acme.UI.MvcSite2 Acme.UI.WinformsApp1 Acme.UI.WinformsApp2 ... The entire solution is checked-in in a single GitHub (private) repo. Acme.Core contains our business logic and all UI projects are deployables. UI projects have different requirements and features, but some of them are implemented in more than one project. All issues are opened in a single issue tracker and classified using labels ([MvcSite1], [WinformsApp1], etc) but I'm thinking it's starting to get messy. Is it ok to use a single repository and issue tracker to track multiple projects in one solution?

    Read the article

  • Mess up between mysql server and phpmyadmin

    - by user206948
    0 down vote favorite After I installed XAMP on my ubuntu 12.10 it was working fine with mysql. I could start mysql- sudo mysql -uroot -p. I connet it using 127.0.0.1:3306 Recently I installed phpmyadmin. When I start it it shows access denied. I got solution from web: sudo /etc/init.d/apache2 stop sudo /etc/init.d/mysql stop sudo /etc/init.d/proftpd stop sudo /opt/lampp/lampp start Now I start phpmyadmin it starts but now I could not connect with mysql on terminal. Additionally phpmyadmin database does not shows all existing databse on mysql. CAn anyone tell me what's going on here? I am using ubuntu 12.10

    Read the article

  • Configuring Novel iPrint client on ubuntu 13.10

    - by Mahdi Sadeghi
    Recently I have struggled a lot to make Novel iPrint client to work on my laptop. I need it to use Follow Me printers in our university(you can take your print form any printer). Using this tutorial from Novel, I tried to convert the rpm package and install it on Ubuntu 13.04 & 13.10. The post install script from installing generated deb package had a typo which I saw in post install messages and I fixed that. Now I have the client running. To see the client UI I installed cinnamon desktop(because unity does not have system tray and old solutions did'nt work to whitelist Novel clinet). I have iPrint plugin installed on firefox as well(I copied the shared object files to plugin directories). I try installing printers from provided ipp URL(which lists available printers on the server) with no success. After clicking the printer name I see this: I have various errors: Formerly firefox used to asked my network username/password for installing SSL printer but now it returns this: iPrint Printer - The printer is currently not available. However I can install non-SSL version but the printer location is either empty or points to: file:///dev/null even if I change it to the exact address which I see on working machines still it prints nothing. I have tried the novel command line tool, iprntcmd to print. It is being installed at: /opt/novell/iprint/bin/ msadeghi@werkstatt:/opt/novell/iprint/bin$ ./iprntcmd --addprinter ipp://iprint.rz.hs-offenburg.de/ipp/Follow-me\ -\ IPP iprntcmd v05.04.00 Adding printer ipp://iprint.rz.hs-offenburg.de/ipp/Follow-me - IPP. Added printer ipp://iprint.rz.hs-offenburg.de/ipp/Follow-me - IPP successfully. It adds the printer with empty location and again no print. What I found interesting is the log file at ~/.iprint/errors.txt with strange errors which I hope somebody here can understand. When I try to install the SSL printer I receive these logs(note that HP is my local printer and has nothing to do with iprint): Thu Oct 31 11:02:03 2013 Trace Info: iprint.c, line 6690 Group Info: IPRINT-lib Error Code: 4096 (0x1000) User ID: 1000 Error Msg: iPrint Lib - Bad URI type supplied (not IPP:, HTTP:, or HTTPS:). Debug Msg: IPRINTInterpretURI for file:///dev/null - Unknown Port Type - file Thu Oct 31 11:02:03 2013 Trace Info: iprint.c, line 6800 Group Info: IPRINT-lib Error Code: 4096 (0x1000) User ID: 1000 Error Msg: iPrint Lib - Bad URI type supplied (not IPP:, HTTP:, or HTTPS:). Debug Msg: IPRINTInterpretURI for hp:/usb/HP_LaserJet_1018?serial=KP103A1 - No Port type specified Thu Oct 31 11:02:05 2013 Trace Info: iprint.c, line 6690 Group Info: IPRINT-lib Error Code: 4096 (0x1000) User ID: 1000 Error Msg: iPrint Lib - Bad URI type supplied (not IPP:, HTTP:, or HTTPS:). Debug Msg: IPRINTInterpretURI for file:///dev/null - Unknown Port Type - file Thu Oct 31 11:02:05 2013 Trace Info: iprint.c, line 6800 Group Info: IPRINT-lib Error Code: 4096 (0x1000) User ID: 1000 Error Msg: iPrint Lib - Bad URI type supplied (not IPP:, HTTP:, or HTTPS:). Debug Msg: IPRINTInterpretURI for hp:/usb/HP_LaserJet_1018?serial=KP103A1 - No Port type specified Thu Oct 31 11:02:06 2013 Trace Info: mydoreq.c, line 676 Group Info: CLIB Error Code: 0 (0x0) User ID: 1000 Error Msg: Success Debug Msg: MyCupsDoFileRequest - httpReconnect failed (0) Thu Oct 31 11:02:06 2013 Trace Info: mydoreq.c, line 1293 Group Info: CUPS-IPP Error Code: 1282 (0x502) User ID: 1000 Error Msg: iPrint Printer - The printer is currently not available. Debug Msg: MyCupsDoFileRequest - IPP SERVICE UNAVAILABLE Thu Oct 31 11:02:06 2013 Trace Info: iprint.c, line 6690 Group Info: IPRINT-lib Error Code: 4096 (0x1000) User ID: 1000 Error Msg: iPrint Lib - Bad URI type supplied (not IPP:, HTTP:, or HTTPS:). Debug Msg: IPRINTInterpretURI for file:///dev/null - Unknown Port Type - file Thu Oct 31 11:02:06 2013 Trace Info: iprint.c, line 6800 Group Info: IPRINT-lib Error Code: 4096 (0x1000) User ID: 1000 Error Msg: iPrint Lib - Bad URI type supplied (not IPP:, HTTP:, or HTTPS:). Debug Msg: IPRINTInterpretURI for hp:/usb/HP_LaserJet_1018?serial=KP103A1 - No Port type specified Thu Oct 31 11:02:08 2013 Trace Info: iprint.c, line 6690 Group Info: IPRINT-lib Error Code: 4096 (0x1000) User ID: 1000 Error Msg: iPrint Lib - Bad URI type supplied (not IPP:, HTTP:, or HTTPS:). Debug Msg: IPRINTInterpretURI for file:///dev/null - Unknown Port Type - file Thu Oct 31 11:02:08 2013 Trace Info: iprint.c, line 6800 Group Info: IPRINT-lib Error Code: 4096 (0x1000) User ID: 1000 Error Msg: iPrint Lib - Bad URI type supplied (not IPP:, HTTP:, or HTTPS:). Debug Msg: IPRINTInterpretURI for hp:/usb/HP_LaserJet_1018?serial=KP103A1 - No Port type specified I should say that my friend can print using the same instructions on CrunchBang easily and another guy on 12.04 LTS but with more struggling. It worked for me on linux mint maya with my old laptop as well. Is there anybody out there who can help me to solve these problems? I am really disappointed with Novell and our university support. PS. I had the same problemwith 13.04. No matter if I am within the network or I connect with VPN, I have the same issues.

    Read the article

  • How to set system-wide proxy address using shell script?

    - by skg
    I want to set system Proxy address through my Qt application. So i was wondering if i could write a script which can be executed by my application every time to change the proxy address. I tried : #! /bin/sh echo "# Generated by Application" export $1 echo "Proxy Address ${1} but this script was not successful. I think it was unable to execute "export" command. Can anyone help me resolving this issue ?

    Read the article

  • ejabberd won't look at my host_config option

    - by John
    I'm new with ejabberd. What I want is to have a host myhost.domain.com which has an ldap authentication method. This all works fine if i modify the global options in AUTHENTICATION section in my ejabberd.cfg file. I am able to create two clients( defined in my LDAP directory ), and comunicate between them. Like i said, this works fine. But by aplying this authentication method globaly, it means that every hostname that i declare must use that. So i'm looking at {host_config, "myhost.domain.com" ...} But somehow i can't get ejabberd to look at that configuration, it just skips it. If i declare it like: {xhost_config, ...}, than in my ejabberd.log file i get a bad return error( so it knows that the configuration is there, but it won't look at it). Any suggestions? Thanks.

    Read the article

  • Dell Alps Touchpad not working

    - by ppls
    I have a Dell 17R SE with Ubuntu 13.04. The touchpad is recognized as PS/2 mouse out of the box, giving just normal touchpad behaviour, but no tap to click, no scrolling, etc. Most answers related to that issue suggest trying an ALPS driver from dahetral.com: http://www.dahetral.com/public-download For installing I followed the steps on this page: https://www.linuxwind.org/html/dell-touchpad-driver-for-ubuntu-13-04.html Now my xinput looks like this: Virtual core pointer id=2 [master pointer (3)] ? ? Virtual core XTEST pointer id=4 [slave pointer (2)] ? ? PS/2 Mouse id=13 [slave pointer (2)] ? ? AlpsPS/2 ALPS GlidePoint id=14 [slave pointer (2)] ? ? Logitech Bluetooth Mouse M555b id=16 [slave pointer (2)] My touchpad isn't working at all now, just the two hardware buttons for left and right mouse buttons work. Interestingly also the tap to click functions works, but only in the address bar of nautilus, nowhere (!) else. What can I do? I would even switch back to initial state, where at least the basic touchpad functionality worked, i I knew, how to get there.

    Read the article

  • 13.04 Logitech bluetooth speaker adapter pairing but no mixer output

    - by user1455622
    I had to change [General] Enable = Socket in /etc/bluetooth/audio.conf to get it to pair. But now that they are I don't get an output in pavucontrol. D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/HFPAG on adapter /org/bluez/3855/hci0. D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/HFPHS on adapter /org/bluez/3855/hci0. D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/A2DPSource on adapter /org/bluez/3855/hci0. D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/A2DPSink on adapter /org/bluez/3855/hci0. E: [pulseaudio] bluetooth-util.c: org.bluez.Media.RegisterEndpoint() failed: org.bluez.Error.AlreadyExists: Already Exists E: [pulseaudio] bluetooth-util.c: org.bluez.Media.RegisterEndpoint() failed: org.bluez.Error.AlreadyExists: Already Exists E: [pulseaudio] bluetooth-util.c: org.bluez.Media.RegisterEndpoint() failed: org.bluez.Error.AlreadyExists: Already Exists E: [pulseaudio] bluetooth-util.c: org.bluez.Media.RegisterEndpoint() failed: org.bluez.Error.AlreadyExists: Already Exists D: [pulseaudio] bluetooth-util.c: dbus: property 'State' changed to value 'disconnected' D: [pulseaudio] bluetooth-util.c: dbus: property 'State' changed to value 'disconnected' D: [pulseaudio] bluetooth-util.c: dbus: property 'State' changed to value 'disconnected' D: [pulseaudio] bluetooth-util.c: dbus: property 'State' changed to value 'disconnected' D: [pulseaudio] bluetooth-util.c: dbus: property 'State' changed to value 'connected' D: [pulseaudio] bluetooth-util.c: dbus: property 'State' changed to value 'connected' D: [pulseaudio] bluetooth-util.c: Unknown Bluetooth minor device class 0 D: [pulseaudio] module-card-restore.c: Not restoring profile for card bluez_card.C8_84_47_15_B7_34, because already set. I: [pulseaudio] module-card-restore.c: Restoring port latency offsets for card bluez_card.C8_84_47_15_B7_34. I: [pulseaudio] card.c: Created 2 "bluez_card.C8_84_47_15_B7_34" W: [pulseaudio] module-bluetooth-device.c: Profile has no transport D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event. I: [pulseaudio] card.c: Changed profile of card 2 "bluez_card.C8_84_47_15_B7_34" to off I: [pulseaudio] module.c: Loaded "module-bluetooth-device" (index: #22; argument: "address=C8:84:47:15:B7:34 profile=a2dp"). I: [alsa-source] alsa-source.c: Scheduling delay of 10,06ms, you might want to investigate this to improve latency... I: [alsa-source] ratelimit.c: 5 events suppressed I: [alsa-source] alsa-source.c: Overrun! I: [alsa-source] alsa-source.c: Increasing minimal latency to 2,00 ms D: [alsa-source] alsa-source.c: latency set to 20,00ms D: [alsa-source] alsa-source.c: hwbuf_unused=62008 D: [alsa-source] alsa-source.c: setting avail_min=442 What can I do to get it working? Regards,

    Read the article

  • Remove/add indicator icons

    - by user209835
    I'm trying out Ubuntu 13.10. I would like to remove some of the default indicator icons in the upper right corner. Is there an easy way to do it? And then I would like to add some other icons (guake, pidgin, shutter, dropbox, kupfer etc.). I have already got the dropbox icon but it's in grey. I would like the default blue icon with the green marker. But if I change theme in ubuntu-tweak or gnome-tweak then the nice shutdown-icon disappears. In linux mint this just works :-).

    Read the article

  • How can I repair a ttf-umefont installation

    - by Julio C Morales
    I have Ubuntu 13.04 and I started to upgrade to 13.10. Upgrading started well, files were sucessfully downloaded but a crash message appeared: <type ´exceptions.SystemError´> (E: The package ttf-umefont needs to be reinstalled, but I can´t find an archive for it) I looked for some info in fórums then I tried to update by terminal and with apt-get -f update. nothing changed; then, I triued to delete the ttf-umefont file, and nothing changed. Now, I can´t update anything because this error message. Could anyone help me?

    Read the article

  • How to change file managers "files" icon to nice "nautilus shell" icon in Ubuntu 12.04?

    - by Ivan Ivanov
    I've attached Nautilus to Unity launcher in Ubuntu 12.04. In Ubuntu 12.04 the default "Files" icon for Nautilus file manager is not as pretty as a "Nautilus Shell" icon. But when I search in Dash for Nautilus it gives "Files" link to Nautilus, which has grey and quite plain file-cabinet icon. How do I change this grey file cabinet icon to the Nautilus' shell icon, which suits well to my icon theme?

    Read the article

  • Partitioning During Installation, Reinstalling Ubuntu, Backup donwloaded Repositories

    - by user209645
    I am new to Ubuntu and I have just finished installing 13.10 amd64 on my PC. This will replace my Windows 7 as my only OS. I just want to clarify some issues that've been bugging me. I tried reading posts with the same topics but I just can't wrap my head to it yet. I partitioned my 80GB drive into: /root: 30GB (sorry for the confusion, I actually meant /) /home: 40GB /var : 3GB swap : 4GB (2GB of mem) Please correct me if I'm wrong about these: All of the users' documents are saved in their respective folders in /home. But say I want to clean install (format) Ubuntu, I don't need to make backups of /home and /var as they are on separate partitions. But when re-installing, do I just choose /root and format and it will recognize all the partitions (not making another /home and /var inside /root)? Downloaded packages (from all the repositories) and all their dependencies are saved in /var. So after re-installing on the same PC (assuming I'm offline), it will just use the latest updates in /var if I choose to update? And if all the installed apps and their dependents are all in there, all I need to do is re-install them without encountering errors? I have also read that you can back them up using aptoncd and then adding the DVD to the sources. So if I download all the high ranking apps using Synaptic, could I then have an all-in-one DVD installer? 30GB for / is excessive because the bulk of files will either be in /home (personal, downloads, music, videos) or /var (updates, packages, installed apps)? Please excuse me for asking such a question but I really want to explore and learn more.

    Read the article

  • libc-bin errors when trying to install php

    - by jonney
    i am trying to update and install php into my ubuntu server 12.04 using the command below: apt-get upgrade php apt-get install php5-curl php5-gd php5-mysql php5-pgsql However i receive this error all the time: gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.2.0-34-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-34-generic.postinst line 1010. dpkg: error processing linux-image-3.2.0-34-generic (--configure): subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of linux-image-server: linux-image-server depends on linux-image-3.2.0-33-generic; however: Package linux-image-3.2.0-33-generic is not configured yet. dpkg: error processing linux-image-server (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-server: linux-server depends on linux-image-server (= 3.2.0.33.36); however: Package linux-image-server is not configured yet. dpkg: error processing linux-server (--configure): dependency problems - leaving unconfigured Setting up libpq5 (9.1.10-0ubuntu12.04) ... No apport report written because the error message indicates it's a follow-up error from a previous failure. No apport report written because MaxReports has already been reached Setting up php5-curl (5.3.10-1ubuntu3.8) ... Setting up php5-pgsql (5.3.10-1ubuntu3.8) ... Processing triggers for initramfs-tools ... update-initramfs: Generating /boot/initrd.img-3.2.0-32-generic gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.2.0-32-generic with 1. dpkg: error processing initramfs-tools (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports has already been reached Processing triggers for libc-bin ... ldconfig deferred processing now taking place Errors were encountered while processing: linux-image-3.2.0-33-generic linux-image-3.2.0-34-generic linux-image-server linux-server initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1) Not sure whats wrong and why it cant process the linux-image files?

    Read the article

  • How do I fix DNS resolving which doesn't work after upgrading to Ubuntu 13.10 (Saucy)

    - by Witek
    After upgrade to 13.10 my DNS resolving fails. It seams the DNS servers which I get by DHCP (LAN) are not used. I could temporary solve the problem by adding nameserver 8.8.8.8 to /etc/resolv.conf. But then the intranet hosts still can not be resolved. When clicking on the Connection Information menu item on the network indicator, the Primary DNS and the Secondary DNS are set correctly. But my computer seams not to use them. So my questions: What should I put into resolv.conf, if anything? How to find out, which name servers my computer is querying? Where to look next, to find out, why name servers received by DHCP are not used?

    Read the article

  • Failed to load Cairo

    - by Ruben
    We're running a Ubuntu Server VM with OpenCPU (that's an API for R). Unfortunately we're unable to get the Cairo R package to play, the error message (from within R) is as follows: unable to load shared object '/usr/lib/R/library/grDevices/libs//cairo.so': /usr/local/lib/libgmodule-2.0.so.0: undefined symbol: g_rec_mutex_lock 2: In png() : failed to load cairo DLL We've tried purging and reinstalling cairo and libcairo and we both tried building the Cairo R package from source as well as using a precompiled version from Michael Rutter's ppas (all seems to work without errors). Unfortunately none of us are real Ubuntu natives and thus we probably did some pretty amateur debugging. Any push in the right direction would be very appreciated. For example, we couldn't figure out how to reinstall whatever libgmodule refers to.

    Read the article

  • How do I run Cisco Packet Tracer 6.0.1?

    - by user186296
    I have a problem running Packet tracer 6.0.1 on Ubuntu 13.04. I have a downloaded file from Cisco Netspace - this file had not extension. I added the extension tar.gz to this file and I could unpack it to a location with other folders and files, there was a file install too. This was a .bin file and I used sudo chmod +x on this file and I used ./filename and installation has been launched I had to accept licence and so on. After successfully installation I tried to launch Packet Tracer and nothing happened. Please help me, how can I correctly install and run Packet Tracer. Note that I'm new in using Linux.

    Read the article

  • Connecting a Samsung Galaxy S3 in Ubuntu 13.04

    - by Squishy
    In 13.04, whenever I connect an Android device, one of three things happens: 1 . It mounts successfully (maybe once out of 3 attempts) 2 . It fails to mount with the following error message: Oops! Something went wrong. Unhandled error message: Unable to open MTP device 3 . This one occasionally happens: Unhandled error message: No such interface `org.gtk.vfs.Mount' on object at path /org/gtk/vfs/mount/1 Regardless of activity (even when successfully mounted) it will continuously spam the following error message: Unable to mount SAMSUNG_Android Unable to open MTP Device '[usb:003,00x]' where x seems to be an arbitrary number below 10 and continues counting up with each new error message until the device is unplugged. I've also just noticed that even if it mounts successfully, it unmounts after about 30 seconds and starts spamming the error message above. The Android device is unlocked, always on and fully charged. ADB seems to function normally. Any suggestions? Further info: this happens on both a stock Samsung S3 and an Xperia Arc S running a custom AOSP based ROM. I've also tried the steps outlined in this Stack Overflow answer, but the problem persists. UPDATE: After doing a dist-upgrade (May 8th 2013), the Xperia Arc S on AOSP ROM now mounts and behaves normally. The S3, however, still behaves as described above. UPDATE: After careful observation, ABD does not, in fact, behave normally. If the error message above appears while sending an app to the device, the attempt is aborted with an error message saying that the device is unavailable.

    Read the article

  • Scale / Spread shows windows from all workspaces in 12.10

    - by dusktreader
    I used Ubuntu Tweak to set up the lower left corner of my screen to activate scale/spread/show_windows/whatever_it's_called. When I upgraded to 12.10, it now shows all open windows from all work-spaces. It used to show only windows from the current workspace. However, when I use super-W to do the same thing, it only shows windows from the current workspace. What is going on here? This feature is one of the main reasons that I use Unity (along with Dash and HUD), and without it working properly my productivity is hurt a lot. Does anyone have a direction that I could look in to fix this?

    Read the article

  • login to account reverts to login screen, guest login ok

    - by Emil Hansen
    When I get to the login screen, I put my password, and I only get a black screen for 2 seconds, then we're back at the login screen. When I log in to the guest account everything works perfectly. What I've tried; I deleted .Xauthority as per instructions from elsewhere. No luck I removed 2 lines I put in .profile. No change Installed Gnome, but Unity, Unity 2D, various vers of gnome, same thing. according to other q/a's, this could be caused by lack of disk space. I have 80 gigs free, so I would assume it's not that if I Ctrl+Alt+F2 at login, I can login in to my account in the "terminal" with no problem. I would really appreciate any help to restore my account, and thank you very much beforehand

    Read the article

  • How to set up a SPF record?

    - by MeltingDog
    The clients on my VPS are all getting spammed. The spam seemingly comes from their own email addresses - it is clear that somehow something got into my VPS and was able to capture all the email addresses that existed and is now using them to send spam. I was advised to set up a SPF record, but I am unsure what this is or how to go about it. After reading, I have figured out how to create one in CPanel, but I cannot find what to do with it now. Do I copy it into somewhere in my DNS records in Zone Management? Can anyone point me in the right direction?

    Read the article

  • How to create a script for moving a 3rd person controller in an iOS device by using Javascript in Unity3D?

    - by user36563
    I've a code but I'm not sure about the steps, so what I should do after the script? pragma strict public var horizontalSpeed : float = 1.0; public var verticalSpeed : float = 1.0; private var h : float = 0.0; private var v : float = 0.0; private var lastPos : Vector3 = Vector3.zero; function Update() { if UNITY_EDITOR if ( Input.GetMouseButtonDown(0) ) { lastPos = Input.mousePosition; } else if ( Input.GetMouseButton(0) ) { var delta = Input.mousePosition - lastPos; h = horizontalSpeed * delta.x ; transform.Rotate( 0, -h, 0, Space.World ); v = verticalSpeed * delta.y ; transform.position += transform.forward * v * Time.deltaTime; lastPos = Input.mousePosition; } else if (Input.touchCount == 1) { var touch : Touch = Input.GetTouch(0); if (touch.phase == TouchPhase.Moved) { h = horizontalSpeed * touch.deltaPosition.x ; transform.Rotate( 0, -h, 0, Space.World ); v = verticalSpeed * touch.deltaPosition.y ; transform.position += transform.forward * v * Time.deltaTime; } } endif }

    Read the article

  • RGB values from image into a one dimension array in c#

    - by velocityxyz
    I was wondering if there is a was a way to read rgb values from an image into a one dimensional array in C#. If it doesnt make sense, in java I would do something like this. int[] pixels; BufferedImage image = getClass().getResourceAsStream("asdfghjkl.png"); int w = image.getWidth(); int h = image.getHeight(); pixels = new int[w * h]; image.getRGB(0, 0, w, h, pixels, 0, w) ; So any help would be great, or if you can point me in the right direction, that'd be great

    Read the article

  • How AlphaBlend Blendstate works in XNA 4 when accumulighting light into a RenderTarget?

    - by cubrman
    I am using a Deferred Rendering engine from Catalin Zima's tutorial: His lighting shader returns the color of the light in the rgb channels and the specular component in the alpha channel. Here is how light gets accumulated: Game.GraphicsDevice.SetRenderTarget(LightRT); Game.GraphicsDevice.Clear(Color.Transparent); Game.GraphicsDevice.BlendState = BlendState.AlphaBlend; // Continuously draw 3d spheres with lighting pixel shader. ... Game.GraphicsDevice.BlendState = BlendState.Opaque; MSDN states that AlphaBlend field of the BlendState class uses the next formula for alphablending: (source × Blend.SourceAlpha) + (destination × Blend.InvSourceAlpha), where "source" is the color of the pixel returned by the shader and "destination" is the color of the pixel in the rendertarget. My question is why do my colors are accumulated correctly in the Light rendertarget even when the new pixels' alphas equal zero? As a quick sanity check I ran the following code in the light's pixel shader: float specularLight = 0; float4 light4 = attenuation * lightIntensity * float4(diffuseLight.rgb,specularLight); if (light4.a == 0) light4 = 0; return light4; This prevents lighting from getting accumulated and, subsequently, drawn on the screen. But when I do the following: float specularLight = 0; float4 light4 = attenuation * lightIntensity * float4(diffuseLight.rgb,specularLight); return light4; The light is accumulated and drawn exactly where it needs to be. What am I missing? According to the formula above: (source x 0) + (destination x 1) should equal destination, so the "LightRT" rendertarget must not change when I draw light spheres into it! It feels like the GPU is using the Additive blend instead: (source × Blend.One) + (destination × Blend.One)

    Read the article

  • ScreenManagement better practices ?! Textbox not focusing

    - by xykudyax
    I saw a question here using DataTemplates with WPF for ScreenManagement, I was curious and I gave it a try I think the ideia is amazing and very clean. Though I'm new to WPF and I read a lot of times that almost everything should be made in XAML and very little should be "coded behind". My questions resolves about using the datatemplate ideia, WHERE should the code that calls the transitions be? where should I define which commands are avaiable in which screens. For example: [ScreenA] Commands: Pressing B - Goes to state B Pressing ESC - Exits [ScreenB] Commands: Pressing A - Goes to state A Pressing SPACE - Exits where do I define the keyEventHandlers? and where do I call the next screen? I'm doing this as an hobby for learning and "if you are learning, better learn it right" :) Thank you for your time. Yes the Q/A I was talking is: What's a good way to handle game screen management in WPF? What I've done so far was to create a Screen class (derived from UserControl) and create some virtual methods: - one for Initializing stuff (like focus a given component by default) - another for inputHandling I handle it by using a switch case and by listening to the PreviewKeyDown event from the parent container (MainWindow) Im not able to do it another way! Help?!. - and a finally one that removes the keyEvent method (when the screen is terminated) Parent.PreviewKeyDown -= OnKeyDown; am I doing okay? I face a problem. When I add a new screen (userControl) containing a TextBox I'm not able to give it autofocus :/ The Caret is there but is not blinking and I have to hit "TAB" before being able to input anything at all :/

    Read the article

  • Count the number of rows of a CSV file, with d3.js

    - by user2934073
    Suppose I have this CSV file Day,What 2013-10-27,Apple 2013-10-27,Cake 2013-10-27,Apple 2013-10-28,Apple 2013-10-28,Apple 2013-10-28,Blueberry 2013-10-28,Orange I would like to drawn with D3.js a time-series graph. All I need to do is to display the sum of the number of rows for each day. As an example, the 27 of November should have 3 as value, the 28th should have 4. Is there a way I can archive it? I've been trying to create a new dataset out of the CSV one with no positive results. var dataset; d3.csv("data.csv", function(d) { return { Day: new Date(d.Day), What: d.What }; }, function(error, rows) { dataset = rows; // I SUPPOSE THE FUNCTION THAT GENERATE THE NEW DATASET SHOULD GO THERE });

    Read the article

  • calculate next line numbers

    - by osomanden
    Weird question I guess.. But I am not very math wiz - soo here goes.. I am trying to create a patterne (or variable patterns based on selection) based on x and y numbers (2 rows and 4 columns) and the direction of the counting of x numbers like: 1-2-3-4 5-6-7-8 That one is easy, when number of x-columns is reached, next line and continue x count. But with eg. this one (still 2 rows and 4 columns): 1-2-3-4 8-7-6-5 upsie.. what if it is eg. 3++ rows and still 4 columns? 1-2-3-4 8-7-6-5 9-10-11-12 what would be the formula for this - or other possible variations (teaser for variations): 9-10-11-12 8-7-6-5 1-2-3-4 or reversed

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >