Daily Archives

Articles indexed Tuesday November 20 2012

Page 3/19 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Networking Icon Keeps Disappearing

    - by Zelda64fan
    Almost every time I unlock my computer the networking icon and the Bluetooth icons are missing from the panel. They also disappear if I disable networking with the 'hardware switch', even though before they would just switch to a 'disabled' look. I know I can get the networking one back by running nm-applet, but I'd rather just find a way to make it stop disappearing. What causes this? This is on 12.10 64-bit, if it matters. UPDATE: I ran it from terminal, and got this: $ nm-applet ** Message: applet now removed from the notification area ** Message: PID 31340 (we are 28924) sent signal 15, shutting down... And then it exited. So it thinks it's supposed to quit...? I haven't been able to figure out what process had that ID.

    Read the article

  • Galaxy Note II MTP on Ubuntu 12.04

    - by Anass Ahmed
    I bought a branding new Galaxy Note II and I tried to mount its storage to my ubuntu laptop. As you know, Android 4.0+ uses MTP by default. Android 4.1 doesn't support USB Mass Storage anymore! So I have to use MTP to open my files via USB. I followed this article to get it work. It worked only for External Memory Card. but the internal cannot be reached! $mount /dev/sda3 on / type ext4 (rw) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) udev on /dev type devtmpfs (rw,mode=0755) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev) /dev/sda5 on /media/Islamics type fuseblk (rw,noexec,nosuid,nodev,allow_other,blksize=4096) /dev/sda8 on /media/Technology type fuseblk (rw,noexec,nosuid,nodev,allow_other,blksize=4096) /dev/sda7 on /media/Misc type fuseblk (rw,noexec,nosuid,nodev,allow_other,blksize=4096) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) gvfs-fuse-daemon on /home/anass/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=anass) gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev) mtpfs on /media/GalaxyNote2 type fuse.mtpfs (rw,nosuid,nodev,allow_other,user=anass)

    Read the article

  • 'Installing breakpad exception handler for appid(steam)' while trying to run Steam

    - by Star Diamond
    I installed steam for ubuntu , so I tried to launch it and i get this : ~$ steam Installing breakpad exception handler for appid(steam)/version(1352224866_client) ~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.10 Release: 12.10 Codename: quantal ~$ lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Whistler XT [AMD Radeon HD 6700M Series] (rev ff) What is the problem and how to fix it?

    Read the article

  • DrRacket icon doesnt work?

    - by Laurie
    I installed DrRacket from the Ubuntu Software Center. All went well and an icon appeared however nothing happened when I clicked the icon so I removed it. Then went to the Developer website and downloaded full-5.3.0.21-bin-x86_64-linux-debian-squeeze.sh. I installed this via Terminal with sudo apt-get install racket. The DrRacket icon came back in Dash Home but again clicking it nothing appears to happen. How do I start DrRacket? I am running Ubuntu 12.04 LTS dual boot on a 64 bit Dell

    Read the article

  • how to start LXDE session automatically after tightvncserver starts to make me able see desktop when connecting to the host via vncclient?

    - by Oleksandr Dudchenko
    I have system which is equipped with Intel Celeron processor 1.1 GHz s370 with 384 Mb of RAM on Intel d815egew motherboard which supports wake-on-lan function. I want to use such a PC for Internet sharing to the local network. Also this PC is a DHCP+DNS server as well as router/gateway. Based on above I decided to install Lubuntu as it is lightweight system. I installed Lubuntu 10.04.4 LTS from alternate ISO. System has no auto login. System boots and has acceptable performance. Host PC has onboard 4 network adapters: eth0 – ethernet controller which is used for Local Network connections. Has static address 10.0.0.1 eth1 – ethernet controller which is not used and not configured so far, I plan to connect printer here later on. eth2 - ethernet controller which is used to connect to Internet, which we plan to share for the local network wlan0 – wireless controller, it is used in role of access poit for local Network and has address 10.0.0.2 We want to control our gateway remotely. So, we need to be able to power it on remotely. To allow this I’ve done the following things: $ cd /etc/init.d/ made a new file with command $ sudo vim wakeonlanconfig Wrote the following lines to the newly created file, saved and closed it #!/bin/bash ethtool -s eth0 wol g ethtool -s eth2 wol g exit Made the abovementioned file executable $ sudo chmod a+x wakeonlanconfig Then included it into autostart sequence during boot. $ sudo update-rc.d -f wakeonlanconfig defaults after system reboot we will be able to poweron system remotely. Than we need to have a possibility to connect remotely to the host via SSH and VNC. So, I installed following packets with the following commands: $ sudo apt-get update $ sudo apt-get install openssh-server tightvncserver Add ssh daemon into autostart sequence during boot. $ sudo update-rc.d -f ssh defaults Power off the host PC $ sudo halt Then I went to remote place, send magic paket and powered the Host up. System started... And I connected to the host via Putty from remote system under Windows. Than logged in and run the command to start vnc server. $ tightvncserver -geometry 800x600 -depth 16 :2 VNC server successfully started and I got message like follows. New 'X' desktop is gateway:2 Starting applications specified in /home/dolv/.vnc/xstartup Log file is /home/dolv/.vnc/gateway:2.log Using UltraVNC Viewer programm under windows I connected to the host's vnc server, enterd the password and.... sow only mouse cursor in form of cross on a grey background of 800x600 dots, no desktop. Here is my .vnc/xstartup file #!/bin/sh xrdb $HOME/.Xresources xsetroot -solid grey #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & # Fix to make GNOME work export XKL_XMODMAP_DISABLE=1 /etc/X11/Xsession The Question: What I have to change and where to make LXDE session start automatically after tightvncserver starts?

    Read the article

  • How to install Radeon Open Source Driver?

    - by Clintonio
    I have an MSI Radeon HD 7850 card. MSI provide no Linux support, and the AMD driver gives me an Unsupported Hardware watermark that does not show up in screenshots. I uninstalled the proprietary driver and found that Unity 3D no longer works, and I really only picked Ubuntu because of the excellent shortcuts provided in the recent versions. Trying to locate the open source driver has been a pain for me. According to the documentation I have read it is pre-included in Ubuntu 12.04, yet there is no Unity 3D support. I tried using the newest drivers from AMD's website, but that also had the watermark. Does anyone know how I can get the open source driver? If not, does anyone know how to remove the watermark. I'm on the verge of going back to Windows.

    Read the article

  • Exim PanicLog has Non-Zero Size...?

    - by willbeeler
    I'm getting the following error from my Ubuntu server: exim paniclog /var/log/exim4/paniclog on (my server FQDN) has non-zero size, mail system might be broken. I found a solution on the web here. Basically, I just need erase the paniclog by entering the following code: sudo rm /var/log/exim4/paniclog So, I know how to get rid of the error, but I don't know how it started, and how to not let it happen again. Any explanation? Thanks in advance.

    Read the article

  • sudo apt-get install -f doesn't fix broken packages. And now?

    - by Du Oliveira
    $ sudo apt-get install -f [sudo] password for ...: Lendo listas de pacotes... Pronto Construindo árvore de dependências Lendo informação de estado... Pronto Corrigindo dependências... Pronto Os seguintes pacotes foram instalados automaticamente e já não são necessários: python-pyasn1 libconfig++8 python-twisted-runner linux-headers-3.0.0-12 libvamp-sdk2 python-twisted-mail libgnomecanvasmm-2.6-1c2a python-twisted-lore python-twisted-conch python-twisted-news python-twisted-words python-twisted libffado2 linux-headers-3.0.0-12-generic libaubio2 Use 'apt-get autoremove' para removê-los. Os pacotes extra a seguir serão instalados: libmpeg3cine Os NOVOS pacotes a seguir serão instalados: libmpeg3cine 0 pacotes atualizados, 1 pacotes novos instalados, 0 a serem removidos e 0 não atualizados. 2 pacotes não totalmente instalados ou removidos. É preciso baixar 0 B/2.573 kB de arquivos. Depois desta operação, 6.762 kB adicionais de espaço em disco serão usados. Você quer continuar [S/n]? S (Lendo banco de dados ... 317732 ficheiros e directórios actualmente instalados.) Desempacotando libmpeg3cine (de .../libmpeg3cine_1%3a2.2-0.3~ppa1~oneiric1_i386.deb) ... dpkg: erro processando /var/cache/apt/archives/libmpeg3cine_1%3a2.2-0.3~ppa1~oneiric1_i386.deb (--unpack): a tentar sobre-escrever '/usr/bin/mpeg3cat', que também está no pacote mpeg3-utils 1.5.4-5ubuntu1 Erros foram encontrados durante o processamento de: /var/cache/apt/archives/libmpeg3cine_1%3a2.2-0.3~ppa1~oneiric1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1) .....:~$ apt-get autoremove E: Não foi possível abrir arquivo de trava /var/lib/dpkg/lock - open (13: Permissão negada) E: Não foi possível travar o diretório administrativo (/var/lib/dpkg/), você é root?

    Read the article

  • SEO Implications of creating Niche Product Blogs vs Main Company Blog with Categories.

    - by Frank
    Our company has a dilemma that I am hoping the users of Pro WebMasters can help us with. Right now as it stands we create a seperate website for each product that we sell. We also have our corporate site which lists each of these brands. For Example: www.Apple.com < --- main company site www.Ipad.com <--- Product www.Iphone.com <--- Product www.Imac.com <-- Product We are looking to build a wordpress blog mainly for the purpose of increasing our SEO rank. Here are our two options: SINGLE BLOG - On Our Corporate Domain http://apple.com/blog Each post is categoried http://apple.com/category/ipad/ipad-5-realeasd.htm Easier to manage than multiple blogs More content since its listing about all our products. ONE BLOG PER PRODUCT - on each site http://ipad.com/blog Each product has its own blog with only its own articles Harder to manage, but does it benefit SEO? Can the team here tell me the SEO benefits of either approach? Similar to Apple all the products our company sells are loosely related. Although its not likely that a customer of product A would be interested in product B.

    Read the article

  • Web hosting providers for businesses (with offsite backups, disaster recovery options, etc.) [closed]

    - by Harry Muscle
    Possible Duplicate: How to find web hosting that meets my requirements? I'm wondering if anyone can point me in the direction of a couple of web hosting providers that are geared towards businesses. By this I mean providers that make it easy to create daily off site backups, are aware that websites require disaster recovery options and have these in place or are able to assist with them, etc. We currently have about a dozen sites with various providers, however, I've been asked to consolidate all of these into one provider and create a full disaster recovery plan. Unfortunately it seems like most providers are geared towards average users that don't require all these extra bells and whistles that businesses need. For example, HostGator, which is a very popular and well reviewed provider, doesn't even allow you to schedule full backups, they have to be manually requested via cPanel and then downloaded once available. If anyone can point out a couple companies that might be able to help with these sorts of things that would be much appreciated. Thanks, Harry P.S. I should also add that we are hoping to stay away from having to manage our own server, we're hoping for a fully managed solution like what HostGator would offer for example.

    Read the article

  • What is the best way to render a 2d game map?

    - by Deukalion
    I know efficiency is key in game programming and I've had some experiences with rendering a "map" earlier but probably not in the best of ways. For a 2D TopDown game: (simply render the textures/tiles of the world, nothing else) Say, you have a map of 1000x1000 (tiles or whatever). If the tile isn't in the view of the camera, it shouldn't be rendered - it's that simple. No need to render a tile that won't be seen. But since you have 1000x1000 objects in your map, or perhaps less you probably don't want to loop through all 1000*1000 tiles just to see if they're suppose to be rendered or not. Question: What is the best way to implement this efficiency? So that it "quickly/quicker" can determine what tiles are suppose to be rendered? Also, I'm not building my game around tiles rendered with a SpriteBatch so there's no rectangles, the shapes can be different sizes and have multiple points, say a curved object of 10 points and a texture inside that shape; Question: How do you determine if this kind of objects is "inside" the View of the camera? It's easy with a 48x48 rectangle, just see if it X+Width or Y+Height is in the view of the camera. Different with multiple points. Simply put, how to manage the code and the data efficiently to not having to run through/loop through a million of objects at the same time.

    Read the article

  • Using Ogre particle point billboards with shaders

    - by Jay
    I'm learning about using Ogre particles and had some questions about how the point type particles work. Q. I believe point type particles are implemented as a single position. Is one single vertex is passed to the vertex shader? Q. If one vertex is passed to the vertex shader then what gets sent to the fragment shader? Q. Can I pass the particle size to the shader? Perhaps with a custom parameter?

    Read the article

  • Need an engine for MMO mockup

    - by Kayle
    What I don't need is an MMORPG engine, at the moment. What I do need is a flexible easy-to-use engine that I can make a mock-up with. I don't need support for more than 10 players in an instance, so any multiplayer platform is probably fine. I need an engine with which I can create the following core features: Waves of simple AI enemies that have specific objectives (move to point A, destroy target, move to point B). The units present can be between 50-200 in number. An over-the-shoulder view and the ability to control a team of 3 (like Mass Effect or the latest Dragon Age) Functioning inventory system Right now, all I can really think of is Unreal or Source. Any other suggestions? Again, this is a proving mock-up, not an actual MMO. I'm not terribly worried about the visual aspects as we just want to test mechanics. Note: Can write some scripts in Python, Ruby, or Lua, if necessary.

    Read the article

  • Can this code cause a memory leak (Arduino)

    - by tbraun89
    I have a arduino project and I created this struct: struct Project { boolean status; String name; struct Project* nextProject; }; In my application I parse some data and create Project objects. To have them in a list there is a pointer to the nextProject in each Project object expect the last. This is the code where I add new projects: void RssParser::addProject(boolean tempProjectStatus, String tempData) { if (!startProject) { startProject = true; firstProject.status = tempProjectStatus; firstProject.name = tempData; firstProject.nextProject = NULL; ptrToLastProject = &firstProject; } else { ptrToLastProject->nextProject = new Project(); ptrToLastProject->nextProject->status = tempProjectStatus; ptrToLastProject->nextProject->name = tempData; ptrToLastProject->nextProject->nextProject = NULL; ptrToLastProject = ptrToLastProject->nextProject; } } firstProject is an private instance variable and defined in the header file like this: Project firstProject; So if there actually no project was added, I use firstProject, to add a new one, if firstProject is set I use the nextProject pointer. Also I have a reset() method that deletes the pointer to the projects: void RssParser::reset() { delete ptrToLastProject; delete firstProject.nextProject; startProject = false; } After each parsing run I call reset() the problem is that the memory used is not released. If I comment out the addProject method there are no issues with my memory. Someone can tell me what could cause the memory leak?

    Read the article

  • DotNetOpenAuth / WebSecurity Basic Info Exchange

    - by Jammer
    I've gotten a good number of OAuth logins working on my site now. My implementation is based on the WebSecurity classes with amends to the code to suit my needs (I pulled the WebSecurity source into mine). However I'm now facing a new set of problems. In my application I have opted to make the user email address the login identifier of choice. It's naturally unique and suits this use case. However, the OAuth "standards" strikes again. Some providers will return your email address as "username" (Google) some will return the display name (Facebook). As it stands I see to options given my particular scenario: Option 1 Pull even more framework source code into my solution until I can chase down where the OpenIdRelyingParty class is actually interacted with (via the DotNetOpenAuth.AspNet facade) and make addition information requests from the OpenID Providers. Option 2 When a user first logs in using an OpenID provider I can display a kind of "complete registration" form that requests missing info based on the provider selected.* Option 2 is the most immediate and probably the quickest to implement but also includes some code smells through having to do something different based on the provider selected. Option 1 will take longer but will ultimately make things more future proof. I will need to perform richer interactions down the line so this also has an edge in that regard. The more I get into the code it does seem that the WebSecurity class itself is actually very limiting as it hides lots of useful DotNetOpenAuth functionality in the name of making integration easier. Andrew (the author of DNOA) has said that the Attribute Exchange stuff happens in the OpenIdRelyingParty class but I cannot see from the DotNetOpenAuth.AspNet source code where this class is used so I'm unsure of what source would need to be pulled into my code in order to enable the functionality I need. Has anyone completely something similar?

    Read the article

  • Weird Datagrid / paint behaviour

    - by Shane.C
    The scenario: A method sends out a broadcast packet, and returned packets that are validated are deemed okay to be added as a row in my datagrid (The returned packets are from devices i want to add into my program). So for each packet returned, containing information about a device, i create a new row. This is done by first sending packets out, creating rows and adding them to a list of rows that are to be added, and then after 5 seconds (In which case all packets would have returned by then) i add the rows. Here's a few snippets of code. Here for each returned packet, i create a row and add it to a list; DataRow row = DGSource.NewRow(); row["Name"] = deviceName; row["Model"] = deviceModel; row["Location"] = deviceLocation; row["IP"] = finishedIP; row["MAC"] = finishedMac; row["Subnet"] = finishedSubnet; row["Gateway"] = finishedGateway; rowsToAdd.Add(row); Then when the timer elapses; void timerToAddRows_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { timerToAddRows.Enabled = false; try { int count = 0; foreach (DataRow rowToAdd in rowsToAdd) { DGSource.Rows.Add(rowToAdd); count++; } rowsToAdd.Clear(); DGAutoDevices.InvokeEx(f => DGAutoDevices.Refresh()); lblNumberFound.InvokeEx(f => lblNumberFound.Text = count + " new devices found."); } catch { } } So at this point, each row has been added, and i call the re paint, by doing refresh. (Note: i've also tried refreshing the form itself, no avail). However, when the datagrid shows the rows, the scroll bar / datagrid seems to have weird behavour..for example i can't highlight anything with clicks (It's set to full row selection), and the scroll bar looks like so; Calling refresh doesn't work, although if i resize the window even 1 pixel, or minimize and maximise, the problem is solved. Other things to note : The method that get's the packets and adds the rows to the list, and then from the list to the datagrid runs in it's own thread. Any ideas as to something i might be missing here?

    Read the article

  • how to create local dynamic varables

    - by xielingyun
    this is my code, i want to use eval() to get the rule status and eval() nead local varables, there is many classes inherit class base, so i should to rewrite get_stat() in every class.i just want to avoid this, an idea is to create dynamic varables in get_stat(),eg. in class b it dynamic create var a and b how to create dynamic varables in function? or any other way to avoid this stupid idea i use python 3.2.3, locals() does not work class base(object): def check(self): stat = get_stat() def get_stat(self): pass class b(base): rule = 'a > 5 and b < 3' a = 0 b = 0 def update_data(self, a, b): self.a = a self.b = b def get_stat(self): a = self.a b = self.b return eval(rule) class b(base): rule = 'd > 5 and e < 3' d = 0 e = 0 def update_data(self, d, e): self.d = d self.e = e def get_stat(self): d = self.d e = self.e return eval(rule)

    Read the article

  • c++ simple start a function with its own thread

    - by user1397417
    i had once had a very simple one or two line code that would start a function with its own thread and continue running until application closed, c++ console app. lost the project it was in, and remember it was hard to find. cant find it online now. most example account for complicated multithreading situations. but i just need to open this one function in its own thread. hopefully someone knows what im talking about, or a similar solution. eg. start void abc in its own thread, no parameters

    Read the article

  • How to marshal a COM-Parameter as VT_ARRAY of VT_RECORD

    - by Oliver Japes
    I've already done some extensive search, but I can't seem to find anything matching my problem. The task I'm currently working on is to create a WCF-Wrapper for some DCOM-Objects. This already works great for the most parts, but now I'm stuck with one invocation that expects a VT_ARRAY containing VT_RECORD-Objects. Marshalling as VT_ARRAY is not a problem, but how can I tell COM that the elements in this array are VT_RECORDs? This is the invocation as I current use it. InitTestCase(testCaseName, parameterFileName, testCase, cellInfos.ToArray()); The parameter I'm talking about is the last one. It's defined as List<CellInfo>, CellInfo itself is already attributed with Guid("7D422961-331E-47E2-BC71-7839E9E77D39") and ComVisible(true). It's not a struct but a class. This is the condition failing on the native side: if (VT_RECORD == varCellConfig.vt)... Because of old software using these interfaces, changing the native side is not an option Any idea?

    Read the article

  • Finding substring of a word found in joining a string from another string

    - by 2er0
    Given a list of words, L, that are all the same length, and a string, S, find the starting position of the substring of S that is a concatenation of each word in L exactly once and without any intervening characters. This substring will occur exactly once in S. Example: L: "fooo", "barr", "wing", "ding", "wing" S: "lingmindraboofooowingdingbarrwingmonkeypoundcake" Word found in joining L and also found in S: "fooowingdingbarrwing" Answer: 13 L: "mon", "key" S: "monkey Word found in joining L and also found in S: "monkey Answer: 0 L: "a", "b", "c", "d", "e" S: "abcdfecdba" Word found in joining L and also found in S: "ecdba Answer: 5

    Read the article

  • Generic DRM (Distributed resource management) wrapper

    - by Pavel Bernshtam
    I need to write a software, which launches DRM jobs in a customer environment and monitors those jobs status. It should work with various customer environments and DRMs - like LSF, Sun Grid and others. Can you recommend some 3rd party library, which hides DRM differences from me and has API like "launch job", "get list of jobs", "get job status" etc. ? Both Java and native libraries are good for me.

    Read the article

  • Form submits but by passing the form validation when button.click is used

    - by Cuty Pie
    I am using form validation plugin as well as html5 attribute=recquired with input type=button or submit and fancybox.when button is clicked ,both validation proceedures work(notification of empty inputs appeare),but instead of this notification ,form is submitted. If I dont use button.click function but use simple submit.then validation works perfectly plugin==http://validatious.org/ javascript function $(document).ready(function() { $('#send').click(function() { $(this).attr("value", 'Applying...'); var id = getParam('ID'); $.ajax({ type:'POST', url:"send.php", data:{option:'catapply', tittle:$('#tittle').val(), aud:aud, con:con, adv:adv, mid:$('#mid').val(), aud2:aud, cid:$('#cid').val(), scid:$('#scname option[selected="saa"]').val(), gtt:$('input[name=gt]:radio:checked').val(), sr:$(":input").serialize() + '&aud=' + aud}, success:function(jd) { $('#' + id).fadeOut("fast", function() { $(this).before("<strong>Success! Your form has been submitted, thanks :)</strong>"); setTimeout("$.fancybox.close()", 1000); }); } }); }); }); AND Html is here <form id="form2" class="validate" style="display: none" > <input type='submit' value='Apply' id="send" class="sendaf validate_any" name="jobforming"/>

    Read the article

  • paypal redirect on successful checkout

    - by Graeme Leighfield
    I am trying to get my Paypal subscription to redirect to a custom page after a successful checkout. Before submitting to Paypal I overload the submit handler, run my own function (to store details) and return a unique id. I want to attach that id to my return URL. (as a GET or POST var so to speak) I have turned auto redirect "on" in my Paypal sandbox sellers preferences, but it only seems to re-direct to the URL that I HAVE to put in there. using the <input type="hidden" name="return" value="someurl" /> does no seem to work. I want it this way so that I can capture the user information when entered with a "non-paid" flag, then via the IPN I can update that record with a "PAID" flag, and I want to use the unique ID to tie it all together so to speak. Any advice or a different approach is welcomed. Many thanks!

    Read the article

  • Impossible to be const-correct when combining data and it's lock?

    - by Graeme
    I've been looking at ways to combine a piece of data which will be accessed by multiple threads alongside the lock provisioned for thread-safety. I think I've got to a point where I don't think its possible to do this whilst maintaining const-correctness. Take the following class for example: template <typename TType, typename TMutex> class basic_lockable_type { public: typedef TMutex lock_type; public: template <typename... TArgs> explicit basic_lockable_type(TArgs&&... args) : TType(std::forward<TArgs...>(args)...) {} TType& data() { return data_; } const TType& data() const { return data_; } void lock() { mutex_.lock(); } void unlock() { mutex_.unlock(); } private: TType data_; mutable TMutex mutex_; }; typedef basic_lockable_type<std::vector<int>, std::mutex> vector_with_lock; In this I try to combine the data and lock, marking mutex_ as mutable. Unfortunately this isn't enough as I see it because when used, vector_with_lock would have to be marked as mutable in order for a read operation to be performed from a const function which isn't entirely correct (data_ should be mutable from a const). void print_values() const { std::lock_guard<vector_with_lock>(values_); for(const int val : values_) { std::cout << val << std::endl; } } vector_with_lock values_; Can anyone see anyway around this such that const-correctness is maintained whilst combining data and lock? Also, have I made any incorrect assumptions here?

    Read the article

  • UIWebView in full screen hides status bar

    - by iPhone
    I am opening video in UIWebView with following code. - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { NSLog(@"Navigatin Type %d %@",navigationType, request); if (navigationType == 0) { self.navigationItem.leftBarButtonItem = backBarBtn; [self showVideoInWebView:[request.URL absoluteString]]; return NO; } return YES; } -(void)showVideoInWebView:(NSString *)urlStr { [mainWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlStr]]]; } but when my mainWebView opens in full screen it hides my status bar. I don't want to hide status bar then how can I show my status bar?

    Read the article

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