Search Results

Search found 985 results on 40 pages for 'al lea'.

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

  • PPTP VPN connection always connects successfully in Mac OS X/windows but drops after 2 minute in iPad or it doesn't connect al all!

    - by Farshid
    Dear Users, I've a big problem with using iPad's VPN connection. When I use the same VPN connection (PPTP) configuration parameters in my Mac OS X Snow Leopard or my windows XP (Bootcamp), it works flawlessly but when I define the same connection in my iPad, connection drops in about 1 or 2 minutes (some times) and most of the time, it Doesn't Connect at all. I'm using iPad 3G with iOS 4.2.1 and my iPad is not jail-broken. I've tried so hard to make it work in an stable manner but not found any solution yet. (I should have put encryption level to No-Encryption in Mac and Windows otherwise it won't connect in my desktop operating systems. It is a host-related issue and I'm binding to that). I'm sure there is no technical problem in my iPad's hardware and this problem also exists in my friend's iPad too. Our devices work perfectly with 3G and Wifi connections. Your answers are really appreciated.

    Read the article

  • Best practice -- Content Tracking Remote Data (cURL, file_get_contents, cron, et. al)?

    - by user322787
    I am attempting to build a script that will log data that changes every 1 second. The initial thought was "Just run a php file that does a cURL every second from cron" -- but I have a very strong feeling that this isn't the right way to go about it. Here are my specifications: There are currently 10 sites I need to gather data from and log to a database -- this number will invariably increase over time, so the solution needs to be scalable. Each site has data that it spits out to a URL every second, but only keeps 10 lines on the page, and they can sometimes spit out up to 10 lines each time, so I need to pick up that data every second to ensure I get all the data. As I will also be writing this data to my own DB, there's going to be I/O every second of every day for a considerably long time. Barring magic, what is the most efficient way to achieve this? it might help to know that the data that I am getting every second is very small, under 500bytes.

    Read the article

  • In FLEX, How can you stop ENTER Key from my Alert being caught by the control that initiated the Al

    - by WeeJavaDude
    I am having an issue where I show an AlertBox message when the user hits ENTER and the focus is in a text area. The pop up works fine, but when the user hits enter the Alert closes as expected, but the TextArea listener receives the ENTER event from the Alert and pops the dialog up again. I have tried a number of ways to catch and eat the event but so far I have not been lucky. Is there way to accomplish this? public function init():void { myTextInput.addEventListener(KeyboardEvent.KEY_UP, handleKeyStrokes); } public function handleKeyStrokes(evt:KeyboardEvent):void { if(evt.keyCode == Keyboard.ENTER) { myAlert = Alert.show("This is a test and only a test", "Title", 4, null, alertCallBack); } } <mx:TextInput id="myTextInput" left="600" top="10"> </mx:TextInput>

    Read the article

  • TOSM e WPC

    - by Valter Minute
    Per chi ha tempo e voglia di fare quattro chiacchiere sui sistemi embedded microsoft, il sottoscritto parteciperà al TOSM, dal 16 al 18 Novembre a Torino e, in qualità di speaker, a WPC 2011, il principale evento formativo Italiano per le tecnologie Microsoft dal 22 al 24 Novembre a Milano (Assago). Saranno due occasioni per presentare queste tecnologie a un’audience un po’ diversa da quella che di solito frequenta gli eventi embedded e per scambiare idee e opinioni con chi non lavora sui sistemi embedded ma, magari, pensa di poterli utilizzare in futuro.

    Read the article

  • Assembly load and execute issue

    - by Jean Carlos Suárez Marranzini
    I'm trying to develop Assembly code allowing me to load and execute(by input of the user) 2 other Assembly .EXE programs. I'm having two problems: -I don't seem to be able to assign the pathname to a valid register(Or maybe incorrect syntax) -I need to be able to execute the other program after the first one (could be either) started its execution. This is what I have so far: mov ax,cs ; moving code segment to data segment mov ds,ax mov ah,1h ; here I read from keyboard int 21h mov dl,al cmp al,'1' ; if 1 jump to LOADRUN1 JE LOADRUN1 popf cmp al,'2' ; if 1 jump to LOADRUN2 JE LOADRUN2 popf LOADRUN1: MOV AH,4BH MOV AL,00 LEA DX,[PROGNAME1] ; Not sure if it works INT 21H LOADRUN2: MOV AH,4BH MOV AL,00 LEA DX,[PROGNAME2] ; Not sure if it works INT 21H ; Here I define the bytes containing the pathnames PROGNAME1 db 'C:\Users\Usuario\NASM\Adding.exe',0 PROGNAME2 db 'C:\Users\Usuario\NASM\Substracting.exe',0 I just don't know how start another program by input in the 'parent' program, after one is already executing. Thanks in advance for your help! Any additional information I'll be more than happy to provide. -I'm using NASM 16 bits, Windows 7 32 bits.

    Read the article

  • Mostrar Imagenes en ListView utilizando ImageList WinForms

    - by Jason Ulloa
    El día de hoy veremos como trabajar con los controles ListView e Imagelist de WindowsForms para poder leer y mostrar una serie de imágenes. Antes de ello debo decir que pueden existir otras formas de mostrar imagenes que solo requieren un control por ejemplo con un Gridview pero eso será en otro post, ahora nos centraremos en la forma de realizarlo con los controles antes mencionados. Lo primero que haremos será crear un nuevo proyecto de windows forms, en mi caso utilizando C#, luego agregaremos un Control ImageList. Este control será el que utilicemos para almacenar todas las imágenes una vez que las hemos leído. Si revisamos el control, veremos que tenemos la opción de agregar la imágenes mediante el diseñador, es decir podemos seleccionarlas manualmente o bien agregarlas mediante código que será lo que haremos. Lo segundo será agregar un control ListView al Formulario, este será el encargado de mostrar las imagenes, eso sí, por ahora será solo mostrarlas no tendrá otras funcionalidades. Ahora, vamos al codeBehind y en el Evento Load del form empezaremos a codificar: Lo primero será, crear una nueva variable derivando DirectoryInfo, a la cual le indicaremos la ruta de nuestra carpeta de imágenes. En nuestro ejemplo utilizamos Application.StartUpPath para indicarle que vamos a buscar en nuestro mismo proyecto (en carpeta debug por el momento). DirectoryInfo dir = new DirectoryInfo(Application.StartupPath + @"\images");   Una vez que hemos creado la referencia a la ruta, utilizaremos un for para obtener todas la imágenes que se encuentren dentro del Folder que indicamos, para luego agregarlas al imagelist y empezar a crear nuestra nueva colección. foreach (FileInfo file in dir.GetFiles()) { try { this.imageList1.Images.Add(Image.FromFile(file.FullName)); }   catch { Console.WriteLine("No es un archivo de imagen"); } }   Una vez, que hemos llenado nuestro ImageList, entonces asignaremos al ListView sus propiedades, para definir la forma en que las imágenes se mostrarán. Un aspecto a tomar en cuenta acá será la propiedad ImageSize ya que está será la que definirá el tamaño que tendrán las imágenes en el ListView cuando sean mostradas. this.listView1.View = View.LargeIcon;   this.imageList1.ImageSize = new Size(120, 100);   this.listView1.LargeImageList = this.imageList1;   Por último y con ayuda de otro for vamos a recorrer cada uno de los elementos que ahora posee nuestro ImageList y lo agregaremos al ListView para mostrarlo for (int j = 0; j < this.imageList1.Images.Count; j++) { ListViewItem item = new ListViewItem();   item.ImageIndex = j;   this.listView1.Items.Add(item); } Como vemos, a pesar de que utilizamos dos controles distintos es realmente sencillo  mostrar la imagenes en el ListView al final el control ImageList, solo funciona como un “puente” que nos permite leer la imagenes para luego mostrarlas en otro control. Para terminar, los proyectos de ejemplo: C# VB

    Read the article

  • Screen problems

    - by Erick
    I struggled a lot in order to install Ubuntu because of a problem with the video drivers caused by when installing the driver and after turning it on it just appears a black screen, which worked for me was to use the terminal with sudo setpci -s 00:02.0 F4.B=0 and the screen starts, but after rebooting the changes won't remain and I have to run that command again. My question is: How can I make the changes permanent and not to be in need to execute that command always when I shut it down? Original Question in Spanish: Problemas con pantalla He batallado mucho al instalar ubuntu por el problema con el controlador de video ya que al instalarlo al encenderla aparece solo una pantalla negra lo que me funciono fue usar desde consola sudo setpci -s 00:02.0 F4.B=0 enciende la pantalla pero al reiniciarla los cambios no se quedan guardados y tengo que volver a ejecutar ese comando mi pregunta es ¿como hacerle para que los cambios queden igual y no tener que estar ejecutando eso siempre que la apago?

    Read the article

  • Why to avoid SELECT * from tables in your Views

    - by Jeff Smith
    -- clean up any messes left over from before: if OBJECT_ID('AllTeams') is not null  drop view AllTeams go if OBJECT_ID('Teams') is not null  drop table Teams go -- sample table: create table Teams (  id int primary key,  City varchar(20),  TeamName varchar(20) ) go -- sample data: insert into Teams (id, City, TeamName ) select 1,'Boston','Red Sox' union all select 2,'New York','Yankees' go create view AllTeams as  select * from Teams go select * from AllTeams --Results: -- --id          City                 TeamName ------------- -------------------- -------------------- --1           Boston               Red Sox --2           New York             Yankees -- Now, add a new column to the Teams table: alter table Teams add League varchar(10) go -- put some data in there: update Teams set League='AL' -- run it again select * from AllTeams --Results: -- --id          City                 TeamName ------------- -------------------- -------------------- --1           Boston               Red Sox --2           New York             Yankees -- Notice that League is not displayed! -- Here's an even worse scenario, when the table gets altered in ways beyond adding columns: drop table Teams go -- recreate table putting the League column before the City: -- (i.e., simulate re-ordering and/or inserting a column) create table Teams (  id int primary key,  League varchar(10),  City varchar(20),  TeamName varchar(20) ) go -- put in some data: insert into Teams (id,League,City,TeamName) select 1,'AL','Boston','Red Sox' union all select 2,'AL','New York','Yankees' -- Now, Select again for our view: select * from AllTeams --Results: -- --id          City       TeamName ------------- ---------- -------------------- --1           AL         Boston --2           AL         New York -- The column labeled "City" in the View is actually the League, and the column labelled TeamName is actually the City! go -- clean up: drop view AllTeams drop table Teams

    Read the article

  • SQL Error: ORA-00936: missing expression

    - by user2901548
    Qns: Item Description and the treatment date of all treatments for any patients named Jessie Stange (ie GivenName is Jessie & FamilyName is Stange) What i wrote: SELECT DISTINCT Description, Date as treatmentDate WHERE doothey.Patient P, doothey.Account A, doothey.AccountLine AL, doothey.Item.I AND P.PatientID = A.PatientID AND A.AccountNo = AL.AccountNo AND AL.ItemNo = I.ItemNo AND (p.FamilyName = 'Stange' AND p.GivenName = 'Jessie'); error: Error at Command Line:1 Column:30 Error report: SQL Error: ORA-00936: missing expression 00936. 00000 - "missing expression" *Cause: *Action: What is the missing expression???

    Read the article

  • How to force GNOME panels et. al. to display on a different monitor without mirroring?

    - by GrueKun
    So, I recently purchased a new 23" monitor for my PC. However, I can't use it with the PC currently as I am waiting on a replacement heatsink. In the mean time, I wanted to use it with my Dell laptop. I hooked it up to the VGA port, and it seems to be working properly. However, I wanted to know if there was a way I could move all of the main display elements over to the attached monitor? I wanted to shut the LCD panel off on the laptop and hook it up like a desktop. Relevant specs: Ubuntu 10.10 x64 Intel graphics chipset The attached monitor is currently set as the default monitor. Any suggestions are welcome. :)

    Read the article

  • Change an array's value in x86 assembly (embedded in C++)

    - by VV
    I am messing around with assembly for the first time, and can't seem to change the index values of an array. Here's the method I am working on int ascending_sort( char arrayOfLetters[], int arraySize ) { char temp; __asm { //??? } } And these are what I tried mov temp, 'X' mov al, temp mov arrayOfLetters[0], al And this gave me an error C2415: improper operand type so I tried mov temp, 'X' mov al, temp mov BYTE PTR arrayOfLetters[0], al This complied, but it didn't change the array...

    Read the article

  • [Assembly] jnz after xor?

    - by kotarou3
    After using IDA Pro to disassemble a x86 dll, I found this code (Comments added by me in pusedo-c code. I hope they're correct): test ebx, ebx ; if (ebx == false) jz short loc_6385A34B ; Jump to 0x6385a34b mov eax, [ebx+84h] ; eax = *(ebx+0x84) mov ecx, [esi+84h] ; ecx = *(esi+0x84) mov al, [eax+30h] ; al = *(*(ebx+0x84)+0x30) xor al, [ecx+30h] ; al = al XOR *(*(esi+0x84)+0x30) jnz loc_6385A453 Lets make it simpler for me to understand: mov eax, b3h xor eax, d6h jnz ... How does the conditional jump instruction work after a xor instruction?

    Read the article

  • Determine Click-thru Percentage With PHP

    - by Lea
    Hi all, I am currently working on a small sponsorship application(PHP/MySql) for my personal blog, and am almost finish, but I am stuck on how to calculate the click-thru rate of my sponsors campaigns. I was always terrible with working out percentages, so any practical help would be appreciated. The data is stored in the DB as simple numbers.. So as expected, when a page refreshes, or a sponsors ad is clicked, the data updates with an incrementation of 1. So using these values...say $clicks and $impressions, how would I determine the click-thru rate? What would be the sum I would use to calculate? An example function would really be appreciated. Kind Regards, Lea

    Read the article

  • Ruby on Rails - pass variable to nested form

    - by Krule
    I am trying to build a multilingual site using Rails, but I can't figure out how to pass variable to nested form. Right now I am creating nested form like this. @languages.each do @article.article_locale.build(:language_id => language.id) end But i would like to pass value of language to it so i can distinguish fields. Something like this. @languages.each do |language| @language = language @article.article_locale.build(:language_id => language.id) end However, I always end up with language of the last loop iteration. Any way to pass this variable? -- edit -- In the end, since I've got no answer I have solved this problem so it, at least, works as it should. Following code is my partial solution. In model: def self.languages Language.all end def self.language_name language = [] self.languages.each_with_index do |lang, i| language[i] = lang.longname end return language end In Controller: def new @article = Article.new Article.languages.each do |language| @article.article_locale.build(:language_id => language.id) end end In HAML View: -count = 0 -f.fields_for :article_locale do |al| %h3= Article.language_name[count] -count+=1 -field_set_tag do %p =al.label :name, t(:name) =al.text_field :name %p =al.label :description, t(:description) =al.text_area :description =al.hidden_field :language_id It's not the most elegant solution I suppose, but it works. I would really love if I could get rid of counter in view for instance.

    Read the article

  • Motores tecnológicos para el crecimiento económico

    - by Fabian Gradolph
    Oracle ha participado hoy en el IV Curso de Verano AMETIC-UPM. La presentación a corrido a cargo de José Manuel Peláez, director de Preventa de Tecnología de Oracle Ibérica, quien ha hecho una completa revisión de cuáles son los impulsores actuales de la innvovación y del desarrollo en el entorno de las tecnologías, haciendo honor al título del curso:  Las TIC en el nuevo entorno socio-económico: Motores de la recuperación económica y el empleo. Peláez, en su presentación "De la tecnología a la innovación: impulsores de la actividad económica",  ha comenzado destacando la importancia estratégica que hoy en día tienen las tecnologías para cualquier modelo de negocio. No se trata ya de hacer frente a la crisis económica, que también, sino sobre todo de hacer frente a los desafíos presentes y futuros de las empresas. En este sentido, es esencial hacer frente a un reto: el alto coste que tiene para las organizaciones la complejidad de sus sistemas tecnológicos. Hay un ejemplo que Oracle utiliza con frecuencia. Si un coche se comprase del mismo modo en que las empresas adquieren los sistemas de información, compraríamos por un lado la carrocería, por otro lado el motor, las ventanas, el cambio de marchas, etc... y luego pasaríamos un tiempo muy interesante montándolo todo en casa. La pregunta clave es: ¿por qué no adquirir los sistemas de información ya preparados para funcionar, al igual que compramos un coche?. El sector TI, con Oracle a la cabeza, está dando uina respuesta adecuada con los sistemas de ingenería conjunta. Se trata de sistemas de hardware y software diseñados y concebidos de forma integrada que reducen considerablemente el tiempo necesario para la implementación, los costes de integración y los costes de energía y mantenimiento. La clave de esta forma de adquirir la tecnología, según ha explicado Peláez, es que al reducir la complejidad y los costes asociados, se están liberando recursos que pueden dedicarse a otras necesidades. Según los datos de Gartner, de la cantidad de recursos invertidos por las empresas en TI, el 63% se dedica a tareas de puro funcionamiento, es decir, a mantener el negocio en marcha. La parte de presupuesto que se dedica a crecimiento del negocio es el 21%, mientras que sólo un 16% se dedica a transformación, es decir, a innovación. Sólo mediante la utilización de tecnologías más eficientes -como los sistemas de ingeniería conjunta-, que lleven aparejados menores costes, es viable reducir ese 63% y dedicar más recursos al crecimiento y la innovación. Ahora bien, una vez liberados los recursos económicos, ¿hacia dónde habría que dirigir las inversiones en tecnología?. José Manuel Peláez ha destacado algunas áreas esenciales como son Big Data, Cloud Computing, los retos de la movilidad y la necesidad de mejorar la experiencia de los clientes, entre otros. Cada uno de estos aspectos lleva aparejados nuevos retos empresariales, pero sólo las empresas que sean capaces de integrarlos en su ADN e incorporarlos al corazón de su estrategia de negocio, podrán diferenciarse en el panorama competitivo del siglo XXI. Desde estas páginas los iremos desgranando poco a poco.

    Read the article

  • Where and how to reference composite MVP components?

    - by Lea Hayes
    I am learning about the MVP (Model-View-Presenter) Passive View flavour of MVC. I intend to expose events from view interfaces rather than using the observer pattern to remove explicit coupling with presenter. Context: Windows Forms / Client-Side JavaScript. I am led to believe that the MVP (or indeed MVC in general) pattern can be applied at various levels of a user interface ranging from the main "Window" to an embedded "Text Field". For instance, the model to the text field is probably just a string whereas the model to the "Window" contains application specific view state (like a persons name which resides within the contained text field). Given a more complex scenario: Documentation viewer which contains: TOC navigation pane Document view Search pane Since each of these 4 user interface items are complex and can be reused elsewhere it makes sense to design these using MVP. Given that each of these user interface items comprises of 3 components; which component should be nested? where? who instantiates them? Idea #1 - Embed View inside View from Parent View public class DocumentationViewer : Form, IDocumentationViewerView { public DocumentationViewer() { ... // Unclear as to how model and presenter are injected... TocPane = new TocPaneView(); } protected ITocPaneView TocPane { get; private set; } } Idea #2 - Embed Presenter inside View from Parent View public class DocumentationViewer : Form, IDocumentationViewerView { public DocumentationViewer() { ... // This doesn't seem like view logic... var tocPaneModel = new TocPaneModel(); var tocPaneView = new TocPaneView(); TocPane = new TocPanePresenter(tocPaneModel, tocPaneView); } protected TocPanePresenter TocPane { get; private set; } } Idea #3 - Embed View inside View from Parent Presenter public class DocumentationViewer : Form, IDocumentationViewerView { ... // Part of IDocumentationViewerView: public ITocPaneView TocPane { get; set; } } public class DocumentationViewerPresenter { public DocumentationViewerPresenter(DocumentationViewerModel model, IDocumentationViewerView view) { ... var tocPaneView = new TocPaneView(); var tocPaneModel = new TocPaneModel(model.Toc); var tocPanePresenter = new TocPanePresenter(tocPaneModel, tocPaneView); view.TocPane = tocPaneView; } } Some better idea...

    Read the article

  • Web Hosting Advice for Project [duplicate]

    - by Lea Hayes
    Possible Duplicate: How to find web hosting that meets my requirements? I am working on a project that will be released as open source in the latter part of the year. I am starting to think about how the accompanying website will be hosted and would greatly appreciate some advice. Requirements: Domain #1 Information about the project itself (just pages and pictures). Documentation / Wiki Forums Download of project source (approx 3MB archive) Download of various themes and community contributed content (est. sizes 10KB ~ 512KB). Domain #2 Primary company website that offers products and services. This will be primarily pictures and pages. What kind of web hosting would be best for a project like this. I am working on a very tight budget and can only afford to spend up to £250 per year for hosting this. I was considering using some sort of VPS hosting. I found the following companies which seem to offer around this price range, but they have very mixed reviews. http://www.webhosting.uk.com/ http://www.eukhost.com/ Godaddy UK uk2 . net My company is based in the UK, how important is it for me to use UK based hosting? There are plenty of overseas hosting companies that are considerably cheaper. When it comes to bandwidth, how many downloads will bandwidth: 100GB get me? Any advice would be very greatly appreciated!

    Read the article

  • Trouble with UV Mapping Blender => Unity 3

    - by Lea Hayes
    For some reason I am getting nasty grey edges around the edges of rendered 3D models that are not present in Blender. I seem to be able to solve the problem by reducing the size of the UV coordinates within the part of the texture that is to be mapped. But this means that: I am wasting valuable texture space Loss of accuracy in drawn UV maps Could I be doing something wrong, perhaps a setting in Unity that needs changing? I have watched countless tutorials which demonstrate Blender default generated UV coordinates with "Texture Paint" which are perfectly aligned in Unity. Here is an illustration of the problem: Left: approximately 15 pixels of margin on each side of UV coordinates Right: Approximately 3 pixels of margin on each side of UV coordinates Note: Texture image resolution is 1024x1024

    Read the article

  • When using Zoom, cursor disappears

    - by Lea
    In Ubuntu 12.04 Unity, when I use the Compiz Zoom feature, the mouse cursor disappears. This did not happen in 10.04, it worked great until I installed 12.04. In 12.04 zoom was disabled by default, so I re-enabled it to use Super+scroll wheel as it was before. The only thing different now is that the shortcut listing appears while zooming, zooming is not as smooth, and I have no mouse cursor. How can I get the cursor to remain visible while zoomed in?

    Read the article

  • Should you charge clients hours spent on the wrong track?

    - by Lea Verou
    I took up a small CSS challenge to solve for a client and I'm going to be paid on a hourly rate. I eventually solved it, it took 4 hours but I spent roughly 30% of the time in the wrong track, trying a CSS3 solution that only worked in recent browsers and finally discovering that no fallback is possible via JS (like I originally thought). Should I charge the client that 30%? More details: I didn't provide an estimate, I liked the challenge per se, so I started working on it before giving an estimate (but I have worked with him before, so I know he's not one of those people that have unrealistic expectations). At the very worst I will have spent 4 unpaid hours on an intriguing CSS challenge. And I will give the fairest possible estimate for both of us, since I will have already done the work. :)

    Read the article

  • Why should ViewModel route actions to Controller when using the MVCVM pattern?

    - by Lea Hayes
    When reading examples across the Internet (including the MSDN reference) I have found that code examples are all doing the following type of thing: public class FooViewModel : BaseViewModel { public FooViewModel(FooController controller) { Controller = controller; } protected FooController Controller { get; private set; } public void PerformSuperAction() { // This just routes action to controller... Controller.SuperAction(); } ... } and then for the view: public class FooView : BaseView { ... private void OnSuperButtonClicked() { ViewModel.PerformSuperAction(); } } Why do we not just do the following? public class FooView : BaseView { ... private void OnSuperButtonClicked() { ViewModel.Controller.SuperAction(); // or, even just use a shortcut property: Controller.SuperAction(); } }

    Read the article

  • How to transform mesh components?

    - by Lea Hayes
    I am attempting to transform the components of a mesh directly using a 4x4 matrix. This is working for the vertex positions, but it is not working for the normals (and probably not the tangents either). Here is what I have: // Transform vertex positions - Works like a charm! vertices = mesh.vertices; for (int i = 0; i < vertices.Length; ++i) vertices[i] = transform.MultiplyPoint(vertices[i]); // Does not work, lighting is messed up on mesh normals = mesh.normals; for (int i = 0; i < normals.Length; ++i) normals[i] = transform.MultiplyVector(normals[i]); Note: The input matrix converts from local to world space and is needed to combine multiple meshes together.

    Read the article

  • Difference between mail. and pop. & smtp.?

    - by Lea Hayes
    When hosting a website I often notice that all of the following are defined under DNS: POP = mail.example.com SMTP = mail.example.com versus POP = pop.example.com SMTP = smtp.example.com Is it wise to use "mail.example.com" for both POP and SMTP when configuring a mail client? What is the difference between each of the two approaches? It seems to work fine (sends and receives mail as expected).

    Read the article

  • Qt Linker Errors

    - by Kyle Rozendo
    Hi All, I've been trying to get Qt working (QCreator, QIde and now VS2008). I have sorted out a ton of issues already, but I am now faced with the following build errors, and frankly I'm out of ideas. Error 1 error LNK2019: unresolved external symbol "public: void __thiscall FileVisitor::processFileList(class QStringList)" (?processFileList@FileVisitor@@QAEXVQStringList@@@Z) referenced in function _main codevisitor-test.obj Question1 Error 2 error LNK2019: unresolved external symbol "public: void __thiscall FileVisitor::processEntry(class QString)" (?processEntry@FileVisitor@@QAEXVQString@@@Z) referenced in function _main codevisitor-test.obj Question1 Error 3 error LNK2019: unresolved external symbol "public: class QString __thiscall ArgumentList::getSwitchArg(class QString,class QString)" (?getSwitchArg@ArgumentList@@QAE?AVQString@@V2@0@Z) referenced in function _main codevisitor-test.obj Question1 Error 4 error LNK2019: unresolved external symbol "public: bool __thiscall ArgumentList::getSwitch(class QString)" (?getSwitch@ArgumentList@@QAE_NVQString@@@Z) referenced in function _main codevisitor-test.obj Question1 Error 5 error LNK2019: unresolved external symbol "public: void __thiscall ArgumentList::argsToStringlist(int,char * * const)" (?argsToStringlist@ArgumentList@@QAEXHQAPAD@Z) referenced in function "public: __thiscall ArgumentList::ArgumentList(int,char * * const)" (??0ArgumentList@@QAE@HQAPAD@Z) codevisitor-test.obj Question1 Error 6 error LNK2019: unresolved external symbol "public: __thiscall FileVisitor::FileVisitor(class QString,bool,bool)" (??0FileVisitor@@QAE@VQString@@_N1@Z) referenced in function "public: __thiscall CodeVisitor::CodeVisitor(class QString,bool)" (??0CodeVisitor@@QAE@VQString@@_N@Z) codevisitor-test.obj Question1 Error 7 error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall FileVisitor::metaObject(void)const " (?metaObject@FileVisitor@@UBEPBUQMetaObject@@XZ) codevisitor-test.obj Question1 Error 8 error LNK2001: unresolved external symbol "public: virtual void * __thiscall FileVisitor::qt_metacast(char const *)" (?qt_metacast@FileVisitor@@UAEPAXPBD@Z) codevisitor-test.obj Question1 Error 9 error LNK2001: unresolved external symbol "public: virtual int __thiscall FileVisitor::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@FileVisitor@@UAEHW4Call@QMetaObject@@HPAPAX@Z) codevisitor-test.obj Question1 Error 10 error LNK2001: unresolved external symbol "protected: virtual bool __thiscall FileVisitor::skipDir(class QDir const &)" (?skipDir@FileVisitor@@MAE_NABVQDir@@@Z) codevisitor-test.obj Question1 Error 11 fatal error LNK1120: 10 unresolved externals ... \Visual Studio 2008\Projects\Assignment1\Question1\Question1\Debug\Question1.exe Question1 The code is as follows: #include "argumentlist.h" #include <codevisitor.h> #include <QDebug> void usage(QString appname) { qDebug() << appname << " Usage: \n" << "codevisitor [-r] [-d startdir] [-f filter] [file-list]\n" << "\t-r \tvisitor will recurse into subdirs\n" << "\t-d startdir\tspecifies starting directory\n" << "\t-f filter\tfilename filter to restrict visits\n" << "\toptional list of files to be visited"; } int main(int argc, char** argv) { ArgumentList al(argc, argv); QString appname = al.takeFirst(); /* app name is always first in the list. */ if (al.count() == 0) { usage(appname); exit(1); } bool recursive(al.getSwitch("-r")); QString startdir(al.getSwitchArg("-d")); QString filter(al.getSwitchArg("-f")); CodeVisitor cvis(filter, recursive); if (startdir != QString()) { cvis.processEntry(startdir); } else if (al.size()) { cvis.processFileList(al); } else return 1; qDebug() << "Files Processed: %d" << cvis.getNumFiles(); qDebug() << cvis.getResultString(); return 0; } Thanks in advance, I'm simply stumped.

    Read the article

  • Poner aplicaci&oacute;n Asp.Net en modo OFFLINE

    - by Jason Ulloa
    Una de las opciones que todo aplicación debería tener es el poder ponerse en modo OFFLINE para evitar el acceso de usuarios. Esto es completamente necesario cuando queremos realizar cambios a nuestra aplicación (cambiar algo, poner una actualización, etc) o a nuestra base de datos y evitarnos problemas con los usuarios que se encuentren logueados dentro de la aplicación en ese momento. Muchos ejemplos a través de la Web exponen la forma de realizar esta tarea utilizando dos técnicas: 1. La primera de ellas es utilizar el archivo App_Offline.htm sin embargo, esta técnica tiene un inconveniente. Y es que, una vez que hemos subido el archivo a nuestra aplicación esta se bloquea completamente y no tenemos forma de volver a ponerla ONLINE a menos que eliminemos el archivo. Es decir no podemos controlarla. 2. La segunda de ellas es el utilizar la etiqueta httpRuntime, pero nuevamente tenemos el mismo problema. Al habilitar el modo OFFLINE mediante esta etiqueta, tampoco podremos acceder a un modo de administración para cambiarla. Un ejemplo de la etiqueta httpRuntime <configuration> <system.web> <httpRuntime enable="false" /> </system.web> </configuration>   Tomando en cuenta lo anterior, lo mas optimo seria que podamos por medio de alguna pagina de administración colocar nuestro sitio en modo OFFLINE, pero manteniendo el acceso a la pagina de administración para poder volver a cambiar el valor que pondrá nuestra aplicación nuevamente en modo ONLINE. Para ello, utilizaremos el web.config de nuestra aplicación y una pequeña clase que se encargara de Leer y escribir los valores. Lo primero será, abrir nuestro web.config y definir dentro del appSettings dos nuevas KEY que contendrán los valores para el modo OFFLINE de nuestra aplicación: <appSettings> <add key="IsOffline" value="false" /> <add key="IsOfflineMessage" value="Sistema temporalmente no disponible por tareas de mantenimiento." /> </appSettings>   En las KEY anteriores tenemos el IsOffLine con value de false, esto es para indicarle a nuestra aplicación que actualmente su modo de funcionamiento es ONLINE, este valor será el que posteriormente cambiemos a TRUE para volver al modo OFFLINE. Nuestra segunda KEY (IsOfflineMessage) posee el value (Sistema temporalmente….) que será mostrado al usuario como un mensaje cuando el sitio este en modo OFFLINE. Una vez definidas nuestras dos KEY en el web.config, escribiremos una clase personalizada para leer y escribir los valores. Así que, agregamos un nuevo elemento de tipo clase al proyecto llamado SettingsRules y la definimos como Public. Está clase contendrá dos métodos, el primero será para leer los valores: public string readIsOnlineSettings(string sectionToRead) { Configuration cfg = WebConfigurationManager.OpenWebConfiguration(System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath); KeyValueConfigurationElement isOnlineSettings = (KeyValueConfigurationElement)cfg.AppSettings.Settings[sectionToRead]; return isOnlineSettings.Value; }   El segundo método, será el encargado de escribir los nuevos valores al web.config public bool saveIsOnlineSettings(string sectionToWrite, string value) { bool succesFullySaved;   try { Configuration cfg = WebConfigurationManager.OpenWebConfiguration(System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath); KeyValueConfigurationElement repositorySettings = (KeyValueConfigurationElement)cfg.AppSettings.Settings[sectionToWrite];   if (repositorySettings != null) { repositorySettings.Value = value; cfg.Save(ConfigurationSaveMode.Modified); } succesFullySaved = true; } catch (Exception) { succesFullySaved = false; } return succesFullySaved; }   Por último, definiremos en nuestra clase una región llamada instance, que contendrá un método encargado de devolver una instancia de la clase (esto para no tener que hacerlo luego) #region instance   private static SettingsRules m_instance;   // Properties public static SettingsRules Instance { get { if (m_instance == null) { m_instance = new SettingsRules(); } return m_instance; } }   #endregion instance   Con esto, nuestra clase principal esta completa. Así que pasaremos a la implementación de las páginas y el resto de código que completará la funcionalidad.   Para complementar la tarea del web.config utilizaremos el fabuloso GLOBAL.ASAX, este contendrá el código encargado de detectar si nuestra aplicación tiene el valor de ONLINE o OFFLINE y además de bloquear todas las paginas y directorios excepto el que le hayamos definido como administrador, esto para luego poder volver a configurar el sitio.   El evento del Global.Asax que utilizaremos será el Application_BeginRequest   protected void Application_BeginRequest(Object sender, EventArgs e) {   if (Convert.ToBoolean(SettingsRules.Instance.readIsOnlineSettings("IsOffline"))) {   string Virtual = Request.Path.Substring(0, Request.Path.LastIndexOf("/") + 1);   if (Virtual.ToLower().IndexOf("/admin/") == -1) { //We don't makes action, is admin section Server.Transfer("~/TemporarilyOfflineMessage.aspx"); }   } } La primer Línea del IF, verifica si el atributo del web.config es True o False, si es true toma la dirección WEB que se ha solicitado y la incluimos en un IF para verificar si corresponde a la Sección admin (está sección no es mas que un folder en nuestra aplicación llamado admin y puede ser cambiado a cualquier otro). Si el resultado de ese if es –1 quiere decir que no coincide, entonces, esa será la bandera que nos permitirá bloquear inmediatamente la pagina actual, transfiriendo al usuario a una pagina de mantenimiento. Ahora, en nuestra carpeta Admin crearemos una nueva pagina asp.net llamada OnlineSettings.aspx para actualizar y leer los datos del web.config y una pagina Default.aspx para pruebas. Nuestra página OnlineSettings tendrá dos pasos importantes: 1. Leer los datos actuales de configuración protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { IsOffline.Checked = Convert.ToBoolean(mySettings.readIsOnlineSettings("IsOffline")); OfflineMessage.Text = mySettings.readIsOnlineSettings("IsOfflineMessage"); } }   2. Actualizar los datos con los nuevos valores. protected void UpdateButton_Click(object sender, EventArgs e) { string htmlMessage = OfflineMessage.Text.Replace(Environment.NewLine, "<br />");   // Update the Application variables Application.Lock(); if (IsOffline.Checked) { mySettings.saveIsOnlineSettings("IsOffline", "True"); mySettings.saveIsOnlineSettings("IsOfflineMessage", htmlMessage); } else { mySettings.saveIsOnlineSettings("IsOffline", "false"); mySettings.saveIsOnlineSettings("IsOfflineMessage", htmlMessage); }   Application.UnLock(); }   Por último en la raíz de la aplicación, crearemos una nueva página aspx llamada TemporarilyOfflineMessage.aspx que será la que se muestre cuando se bloquee la aplicación. Al final nuestra aplicación se vería algo así Página bloqueada Configuración del Bloqueo Y para terminar la aplicación de ejemplo

    Read the article

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