Search Results

Search found 16021 results on 641 pages for 'mr nothing'.

Page 11/641 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Linux server, locating files containing nothing but 4 specific lines.

    - by Denis
    Hi, I'm dealing with a compromised website, in which hackers injected an htaccess instruction to redirect traffic. I can easily locate .htaccess files that contain the forwarding hack, BUT in cases where the directory already contained an htaccess file, they appended the dangerous instructions, so I cannot just deleted any htaccess file or could harm the site by letting formerly pw-protected directories wide open, or urlrewrite instructions (WordPress) be deleted, etc. I could not find the way to locate files that only contain those 4 lines of redirect hack, could you shed some light ? So far, using find . -type f -exec grep -q targetpiratedomain {} \; -exec echo rm {} \; Thanks !

    Read the article

  • Someone please can see why the following prepared statment returns nothing?

    - by jartaud
    $stmt = mysqli_prepare($link,"SELECT *FROM ads INNER JOIN dept ON dept.id_dept = ads.in_dpt INNER JOIN members ON members.idMem = ads.from_Mem INNER JOIN sub_cat_ad ON id_sub_cat = ads.ads_in_Cat INNER JOIN cat_ad ON idCat_ad = sub_cat_ad.from_cat_ad WHERE ads_in_Cat = ? "); if(isset($_GET['fromSCat'])){ $fromSCat = mysqli_real_escape_string($link,$_GET['fromSCat']);} mysqli_stmt_bind_param($stmt,'i',$fromSCat); mysqli_stmt_execute($stmt); mysqli_stmt_fetch($stmt); $tot=mysqli_stmt_num_rows($stmt); //Ouput: 0

    Read the article

  • How can I get a set of radio buttons to accept NULL (nothing checked)?

    - by Ethan
    I'm working on a Rails application where I have some a set of two radio buttons where users can click "yes" or "no". The MySQL DB column created by the ActiveRecord migration is a tinyint. If the user doesn't click either radio button I want MySQL to store NULL. (The column allows NULL.) And when they come back to edit the data, neither button should be checked. What's happening is that ActiveRecord is storing 0 and then when I come back the "No" button is checked. Rails 2.3.5 Form code (I'm using Haml): = f.radio_button( :model_attribute, true ) Yes = f.radio_button( :model_attribute, false ) No (In retrospect it probably would have been better to use a single checkbox, but it would be difficult to change that now.)

    Read the article

  • Mod_rewrite trouble: Want to direct from ?= to a flat link, nothing seems to work.

    - by Davezatch
    I have a site that currently serves results as example.com/index.php?show=foo and I'd like it to read example.com/show/foo. My understanding is this would make them visible to search engine robots, and it seems a much simpler way to do this than to create a couple hundred html files... I've tried the following .htaccess code: Options +FollowSymLinks RewriteEngine on RewriteRule ^show/(.*)$ index.php?show=$1 [NC,L] No dice. Also tried this, which I found on another stack overflow question: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([0-9A-Za-z]+)/?$ /index.php?show=$1 [L] </IfModule> Any ideas on what I'm missing here?

    Read the article

  • How do I gather a class' css attributes given nothing but the className?

    - by user1128571
    For example I might have some css stuff that looks like this: .divType1 { position: absolute; width: 60px; height: 60px; left: 400px; top: 100px; border: 1px solid #89B; z-index: 0; } Now within Javascript I want to gather div class divType1' css attributes, but am provided only with the div class, so I can't do something of form ( pseudo-code ): selectDivWithClass( divType1 ).getCss(left). I could hack something by instantiating a div with class divType1 and grab its css attributes, and then destroy it, but is there a better way?

    Read the article

  • How can i pass nothing or a blank cell to an Optional argument in VBA?

    - by user2985990
    I am trying to set up a function so that whether I pass a blank cell or do not even select a cell for the argument it returns the function I am looking for. Here is my code: Function FinancialsAge(FirstBirthday As Date, BeginningDate As Date, Optional Second Birthday As Variant) As String If IsMissing(SecondBirthday) = True Or SecondBirthday = vbNullString Then FinancialsAge = Year(BeginningDate - FirstBirthday) - 1900 ElseIf SecondBirthday Then FinancialsAge = (Year(BeginningDate - FirstBirthday) - 1900) & "/" & (Year(BeginningDate - SecondBirthday) - 1900) End If End Function This code works fine as long as I select a blank cell for the third argument but when I leave the third argument out I get a "#Value!" error in the cell. Anyway to do this in Excel VBA so that the function works under both circumstances? Thanks,

    Read the article

  • CISDI Cloud - Industrial Cloud Computing Platform based on Oracle Products

    - by Wenyu Duan
    In today's era, Cloud Computing is becoming integral to the vision and corporate strategy of leading organizations and is often seen as a key business driver to achieve growth and innovation. Headquartered in Chongqing, China, CISDI Engineering Co., Ltd. is a large state-owned engineering company, offering consulting, engineering design, EPC contracting, and equipment integration services to steel producers all over the world. With over 50 years of experience, CISDI offers quality services for every aspect of production for projects in the metal industry and the company has evolved into a leading international engineering service group with 18 subsidiaries providing complete lifecycle for E&C projects. CISDI group delegation led by Mr. Zhaohui Yu, CEO of CISDI Group, Mr. Zhiyou Li, CEO of CISDI Info, Mr. Qing Peng, CTO of CISDI Info and Mr. Xin Xiao, Head of CISDI Info's R&D joined Oracle OpenWorld 2012 and presented a very impressive cloud initiative case in their session titled “E&C Industry Solution in CISDI Cloud - An Industrial Cloud Computing Platform Based on Oracle Products”. CISDI group plans to expand through three phases in the construction of its cloud computing platform: first, it will relocate its existing technologies to Oracle systems, along with establishing private cloud for CISDI; secondly, it will gradually provide mixed cloud services for its subsidiaries and partners; and finally it plans to launch an industrial cloud with a highly mature, secure and scalable environment providing cloud services for customers in the engineering construction and steel industries, among others. “CISDI Cloud” will become the growth engine for the organization to expand its global reach through online services and achieving the strategic objective of being the preferred choice of E&C companies worldwide. The new cloud computing platform is designed to provide access to the shared computing resources pool in a self-service, dynamic, elastic and measurable way. It’s flexible and scalable grid structure can support elastic expansion and sustainable growth, and can bring significant benefits in speed, agility and efficiency. Further, the platform can greatly cut down deployment and maintenance costs. CISDI delegation highlighted these points as the key reasons why the group decided to have a strategic collaboration with Oracle for building this world class industrial cloud - - Oracle’s strategy: Open, Complete and Integrated - Oracle as the only company who can provide engineered system, with complete product chain of hardware and software - Exadata, Exalogic, EM 12c to provide solid foundation for "CISDI Cloud" The cloud blueprint and advanced architecture for industrial cloud computing platform presented in the session shows how Oracle products and technologies together with industrial applications from CISDI can provide end-end portfolio of E&C industry services in cloud. CISDI group was recognized for business leadership and innovative solutions and was presented with Engineering and Construction Industry Excellence Award during Oracle OpenWorld.

    Read the article

  • External Monitors shut off when Laptop Lid closes

    - by John Lanz
    I have researched the solution... gconftool-2 --type string --set /apps/gnome-power-manager/buttons/lid_ac "nothing" does not fix it. I have two external monitors and when I close my lid the settings are reset and the laptop's monitor is set to the default. Thanks! gsettings list-recursively org.gnome.settings-daemon.plugins.power org.gnome.settings-daemon.plugins.power active true org.gnome.settings-daemon.plugins.power button-hibernate 'nothing' org.gnome.settings-daemon.plugins.power button-power 'nothing' org.gnome.settings-daemon.plugins.power button-sleep 'nothing' org.gnome.settings-daemon.plugins.power button-suspend 'nothing' org.gnome.settings-daemon.plugins.power critical-battery-action 'suspend' org.gnome.settings-daemon.plugins.power idle-brightness 30 org.gnome.settings-daemon.plugins.power idle-dim-ac false org.gnome.settings-daemon.plugins.power idle-dim-battery true org.gnome.settings-daemon.plugins.power idle-dim-time 10 org.gnome.settings-daemon.plugins.power lid-close-ac-action 'nothing' org.gnome.settings-daemon.plugins.power lid-close-battery-action 'nothing' org.gnome.settings-daemon.plugins.power notify-perhaps-recall true org.gnome.settings-daemon.plugins.power percentage-action 2 org.gnome.settings-daemon.plugins.power percentage-critical 3 org.gnome.settings-daemon.plugins.power percentage-low 10 org.gnome.settings-daemon.plugins.power priority 1 org.gnome.settings-daemon.plugins.power sleep-display-ac 600 org.gnome.settings-daemon.plugins.power sleep-display-battery 600 org.gnome.settings-daemon.plugins.power sleep-inactive-ac false org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0 org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'suspend' org.gnome.settings-daemon.plugins.power sleep-inactive-battery true org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0 org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend' org.gnome.settings-daemon.plugins.power time-action 120 org.gnome.settings-daemon.plugins.power time-critical 300 org.gnome.settings-daemon.plugins.power time-low 1200 org.gnome.settings-daemon.plugins.power use-time-for-policy true

    Read the article

  • executing null values records

    - by jjj
    i am trying to execute the records that have TotalTime null value from the table NewTimeAttendance...TotalTime datatype nchar(10) select * from newtimeattendance where TotalTime = 'NULL' ....nothing select * from newtimeattendance where TotalTime = 'null' ....nothing select * from newtimeattendance where TotalTime = 'Null' ....nothing select * from newtimeattendance where TotalTime = null ....nothing select * from newtimeattendance where TotalTime = Null ....nothing select * from newtimeattendance where TotalTime = NULL ....nothing when i select the whole table i can see that there is some NULL TotalTime values..!! it is small select statment ..why doesn't it work ? is there a way (special way ) to execute the 'NULL' with nchar type ?! thanks in advance

    Read the article

  • Need help profiling .NET caching extension method.

    - by rockinthesixstring
    I've got the following extension Public Module CacheExtensions Sub New() End Sub Private sync As New Object() Public Const DefaultCacheExpiration As Integer = 1200 ''# 20 minutes <Extension()> Public Function GetOrStore(Of T)(ByVal cache As Cache, ByVal key As String, ByVal generator As Func(Of T)) As T Return cache.GetOrStore(key, If(generator IsNot Nothing, generator(), Nothing), DefaultCacheExpiration) End Function <Extension()> Public Function GetOrStore(Of T)(ByVal cache As Cache, ByVal key As String, ByVal generator As Func(Of T), ByVal expireInSeconds As Double) As T Return cache.GetOrStore(key, If(generator IsNot Nothing, generator(), Nothing), expireInSeconds) End Function <Extension()> Public Function GetOrStore(Of T)(ByVal cache As Cache, ByVal key As String, ByVal obj As T) As T Return cache.GetOrStore(key, obj, DefaultCacheExpiration) End Function <Extension()> Public Function GetOrStore(Of T)(ByVal cache As Cache, ByVal key As String, ByVal obj As T, ByVal expireInSeconds As Double) As T Dim result = cache(key) If result Is Nothing Then SyncLock sync If result Is Nothing Then result = If(obj IsNot Nothing, obj, Nothing) cache.Insert(key, result, Nothing, DateTime.Now.AddSeconds(expireInSeconds), cache.NoSlidingExpiration) End If End SyncLock End If Return DirectCast(result, T) End Function End Module From here, I'm using the extension is a TagService to get a list of tags Public Function GetTagNames() As List(Of String) Implements Domain.ITagService.GetTags ''# We're not using a dynamic Cache key because the list of TagNames ''# will persist across all users in all regions. Return HttpRuntime.Cache.GetOrStore(Of List(Of String))("TagNamesOnly", Function() _TagRepository.Read().Select(Function(t) t.Name).OrderBy(Function(t) t).ToList()) End Function All of this is pretty much straight forward except when I put a breakpoint on _TagRepository.Read(). The problem is that it is getting called on every request, when I thought that it is only to be called when Result Is Nothing Am I missing something here?

    Read the article

  • How to switch off Outlook Synchronization Manager

    - by mr.nothing
    I have one strange thing which is happening to my outlook. It tries to synchronize something (seems it do this every time send/recieve triggers). Does anybody know how to switch this manager off? Here is the icon of the sync manager in the task bar (left one) https://www.sugarsync.com/pf/D9085558_69411843_95701 Thanks in advance! p.s. it's also annoying me that something gone wrong and sync failed. Also every time it tries to sync something internet explorer says me that there are too many temporary internet files and asking me to expand space for its storing. https://www.sugarsync.com/pf/D9085558_69411843_95781 Please, help! This makes me crazy.

    Read the article

  • video card for only watching videos

    - by Nothing 2 Lose
    I recently quit gaming so I took out my (GeForce GTX 550 Ti) video card and switched back to the (cheap) integrated card because I don't want the dedicated card using up power & making unnecessary heat/noise. But now I get lag when I watch high-res movies, or when I open several videos at the same time, but I don't want to go back to my (big/expensive) video card because that seems like overkill. What is the smallest/cheapest card which will only be good enough for watching videos without lagging ? (but not for gaming) PS. My CPU is: AMD Phenom 9850 Quad-Core Processor

    Read the article

  • Building my own computer

    - by There is nothing we can do
    I'm planning to build my own computer. I do not have enough cash to buy all components I need in one go. I want to ask, if I buy motherboard which is compatible with i7 processor (any) and compatible with graphic card Nvidia gtx 780, does it mean that this mother board will be compatible with processors (from intel) which will be released next year? Same for graphic cards? The point is that I'd like to avoid situation where I buy motherboard let's say now, and in couple of months there will be new graphic card/processor which will not be compatible with my mother board? Or maybe shall I start completely somewhere else?

    Read the article

  • Why is a fully transparent pixel still rendered?

    - by Mr Bell
    I am trying to make a pixel shader that achieves an effect similar to this video http://www.youtube.com/watch?v=f1uZvurrhig&feature=related My basic idea is render the scene to a temp render target then Render the previously rendered image with a slight fade on to another temp render target Draw the current scene on top of that Draw the results on to a render target that persists between draws Draw the results on to the screen But I am having problems with the fading portion. If I have my pixel shader return a color with its A component set to 0, shouldn't that basically amount to drawing nothing? (Assuming that sprite batch blend mode is set to AlphaBlend) To test this I have my pixel shader return a transparent red color. Instead of nothing being drawn, it draws a partially transparent red box. I hope that my question makes sense, but if it doesnt please ask me to clarify Here is the drawing code public override void Draw(GameTime gameTime) { GraphicsDevice.SamplerStates[1] = SamplerState.PointWrap; drawImageOnClearedRenderTarget(presentationTarget, tempRenderTarget, fadeEffect); drawImageOnRenderTarget(sceneRenderTarget, tempRenderTarget); drawImageOnClearedRenderTarget(tempRenderTarget, presentationTarget); GraphicsDevice.SetRenderTarget(null); drawImage(backgroundTexture); drawImage(presentationTarget); base.Draw(gameTime); } private void drawImage(Texture2D image, Effect effect = null) { spriteBatch.Begin(0, BlendState.AlphaBlend, SamplerState.PointWrap, null, null, effect); spriteBatch.Draw(image, new Rectangle(0, 0, width, height), Color.White); spriteBatch.End(); } private void drawImageOnRenderTarget(Texture2D image, RenderTarget2D target, Effect effect = null) { GraphicsDevice.SetRenderTarget(target); drawImage(image, effect); } private void drawImageOnClearedRenderTarget(Texture2D image, RenderTarget2D target, Effect effect = null) { GraphicsDevice.SetRenderTarget(target); GraphicsDevice.Clear(Color.Transparent); drawImage(image, effect); } Here is the fade pixel shader sampler TextureSampler : register(s0); float4 PixelShaderFunction(float2 texCoord : TEXCOORD0) : COLOR0 { float4 c = 0; c = tex2D(TextureSampler, texCoord); //c.a = clamp(c.a - 0.05, 0, 1); c.r = 1; c.g = 0; c.b = 0; c.a = 0; return c; } technique Fade { pass Pass1 { PixelShader = compile ps_2_0 PixelShaderFunction(); } }

    Read the article

  • Recommended books on C++

    - by Mr Teeth
    Hi, I'm looking for a book that contains a CDRom with a IDE for readers to install and use as a environment to learn C++ on. Like the "Objects First With Java - A Practical Introduction Using BlueJ" books, where Java is learnt on BlueJ. Is there a book like this teaching C++? If there isn't any books like this, i'll still appericiate a recommended book for a novice to learn C++ on. I know nothing about C++ and I want to learn during my private times.

    Read the article

  • DDD and Value Objects. Are mutable Value Objects a good candidate for Non Aggr. Root Entity?

    - by Tony
    Here is a little problem Have an entity, with a value object. Not a problem. I replace a value object for a new one, then nhibernate inserts the new value and orphan the old one, then deletes it. Ok, that's a problem. Insured is my entity in my domain. He has a collection of Addresses (value objects). One of the addresses is the MailingAddress. When we want to update the mailing address, let's say zipcode was wrong, following Mr. Evans doctrine, we must replace the old object for a new one since it's immutable (a value object right?). But we don't want to delete the row thou, because that address's PK is a FK in a MailingHistory table. So, following Mr. Evans doctrine, we are pretty much screwed here. Unless i make my addressses Entities, so i don't have to "replace" it, and simply update its zipcode member, like the old good days. What would you suggest me in this case? The way i see it, ValueObjects are only useful when you want to encapsulate a group of database table's columns (component in nhibernate). Everything that has a persistence id in the database, is better off to make it an Entity (not necessarily an aggregate root) so you can update its members without recreating the whole object graph, specially if that's a deep-nested object. Do you concur? Is it allowed by Mr. Evans to have a mutable value object? Or is a mutable value object a candidate for an Entity? Thanks

    Read the article

  • First ATMs programming language

    - by revo
    First ATMs performed tasks like a cash dispenser, they were offline machines which worked with punch cards impregnated with Carbon and a 6-digit PIN code. Maximum withdrawal with a card was 10 pounds and each one was a one-time use card - ATM swallowed cards! The first ATM was installed in London in the year 1967, as I looked at time line of programming languages, there were many programming languages made before that decade. I don't know about the hardware neither, but in which programming language it was written? *I didn't find a detailed biography of John Shepherd-Barron (ATM inventor at 70s) Update I found this picture, which is taken from a newspaper back to the year 1972 in Iran. Translated PS : Shows Mr. Rad-lon (if spelled correctly), The manager of Barros (if spelled correctly) International Educational Institute in United Kingdom at the right, and Mr. Jim Sutherland - Expert of Computer Kiosks. In the rest of the text I found on this paper, these kind of ATMs which called "Automated Computer Kiosk" were advertised with this: Mr. Rad-lon (if spelled correctly) puts his card to one specific location of Automated Computer Kiosk and after 10 seconds he withdraws his cash. Two more questions are: 1- How those ATMs were so fast? (withdrawal in 10 seconds in that year) 2- I didn't find any text on Internet which state about "Automated Computer Kiosk", Is it valid or were they being called Computer in that time?

    Read the article

  • How do you Send More that 20 Parameters to a Stored Procedure Using ODP.Net?

    - by discwiz
    Switching from Microsofts Oracle Driver to ODP.NET version 10.2.0.100. After changing the data types to OracleDBTypes in a procedure, that worked perficetly using System.Data.OracleClient, the procedure fails if we try and pass in more that 20 parameters. The error returned is: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'ADD_TARP_EVENT' ORA-06550: line 1, column 7: PL/SQL: Statement ignorede If we reduce the number of parameters to less than 20 it works. Is this a known issue? Thanks, Dave Here the code for creating the parameters: Shared Function CreateTarpEventCommand(ByVal aTarpEvent As TARPEventType) As OracleCommand Dim cmd As New OracleCommand With aTarpEvent cmd.Parameters.Add(New OracleParameter("I_facID_C", OracleDbType.Char)).Value = .FacilityShortName cmd.Parameters.Add(New OracleParameter("I_facName_VC", OracleDbType.Varchar2)).Value = .FacilityLongName cmd.Parameters.Add(New OracleParameter("I_client_VC", OracleDbType.Varchar2)).Value = .ComputerNameTarpIsRunningOn cmd.Parameters.Add(New OracleParameter("I_TARP_Version_VC", OracleDbType.Varchar2)).Value = .TarpVersionNumber cmd.Parameters.Add(New OracleParameter("I_NAS_Type_VC", OracleDbType.Varchar2)).Value = .FacilityNASSystemType cmd.Parameters.Add(New OracleParameter("I_Aircraft1_Callsign_VC", OracleDbType.Varchar2)).Value = .Aircraft1Callsign If .Aircraft1Type Is Nothing Then cmd.Parameters.Add(New OracleParameter("I_Aircraft1_Type_VC", OracleDbType.Varchar2)).Value = .Aircraft1Type End If If .Aircraft1Category Is Nothing Then cmd.Parameters.Add(New OracleParameter("I_Aircraft1_Cat_VC", OracleDbType.Varchar2)).Value = .Aircraft1Category End If cmd.Parameters.Add(New OracleParameter("I_Aircraft2_Callsign_VC", OracleDbType.Varchar2)).Value = .Aircraft2Callsign If .Aircraft2Type Is Nothing Then cmd.Parameters.Add(New OracleParameter("I_Aircraft2_Type_VC", OracleDbType.Varchar2)).Value = .Aircraft2Type End If If .Aircraft2Category Is Nothing Then cmd.Parameters.Add(New OracleParameter("I_Aircraft2_Cat_VC", OracleDbType.Varchar2)).Value = .Aircraft2Category End If If .SensorShortName Is Nothing Then cmd.Parameters.Add(New OracleParameter("I_Sensor_Name_VC", OracleDbType.Varchar2)).Value = .SensorShortName End If If .TarpConfigurationName Is Nothing Then cmd.Parameters.Add(New OracleParameter("I_TARP_Config_Name_VC", OracleDbType.Varchar2)).Value = .TarpConfigurationName End If If .EntryCreatorID Is Nothing Then cmd.Parameters.Add(New OracleParameter("I_Create_VC", OracleDbType.Varchar2)).Value = .EntryCreatorID End If If .LogAction Is Nothing Then cmd.Parameters.Add(New OracleParameter("I_Log_Action_VC", OracleDbType.Varchar2)).Value = .LogAction End If cmd.Parameters.Add(New OracleParameter("I_TARP_Mode_VC", OracleDbType.Varchar2)).Value = .TarpOperatingMode cmd.Parameters.Add(New OracleParameter("I_Min_Loss_N", OracleDbType.Decimal)).Value = .ClosestMeasureOfLoSS If .MapName Is Nothing Then cmd.Parameters.Add(New OracleParameter("I_MAP_NAME_VC", OracleDbType.Varchar2)).Value = .MapName End If If .TarpConfigurationFileHash Is Nothing Then cmd.Parameters.Add(New OracleParameter("I_CONFIG_HASH_VC", OracleDbType.Varchar2)).Value = .TarpConfigurationFileHash End If Dim aDate As OracleDate = CType(.LossEventsMessages(0).LossEventTime, System.DateTime) cmd.Parameters.Add(New OracleParameter("I_FIRST_LOSS_EVENT_DATE", OracleDbType.Date)).Value = aDate cmd.Parameters.Add(New OracleParameter("I_FIRST_LOSS_EVENT_MS_N", OracleDbType.Int32)).Value = .LossEventsMessages(0).LossEventMilliSeconds If .ZippedMapFiles Is Nothing Then cmd.Parameters.Add(New OracleParameter("I_Map_File_BL", OracleDbType.Blob)).Value = .ZippedMapFiles End If cmd.Parameters.Add(New OracleParameter("I_TARP_Package_BL", OracleDbType.Blob)).Value = .ZippedTarpPackageWithoutMaps cmd.Parameters.Add(New OracleParameter("rs_RESULTS", OracleDbType.RefCursor)).Direction = ParameterDirection.Output End With Return cmd End Function And here is the code for executing the procedure: Dim workingDataSet As New DataSet Dim oracleConnection As New OracleConnection Dim cmd As New OracleCommand Dim oracleDataAdapter As New OracleDataAdapter Try Using oracleConnection oracleConnection.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("MasterConnectionODT") cmd = HelperDB.CreateTarpEventCommand(TarpEvent) cmd.Connection = oracleConnection cmd.CommandText = "LOADER.ADD_TARP_EVENT" cmd.CommandType = CommandType.StoredProcedure Using oracleConnection oracleConnection.Open() Dim aTransation As OracleTransaction = oracleConnection.BeginTransaction(IsolationLevel.ReadCommitted) Try Using oracleDataAdapter oracleDataAdapter = New OracleDataAdapter(cmd) oracleDataAdapter.TableMappings.Add("Results", "rs_Max") oracleDataAdapter.Fill(workingDataSet) ....

    Read the article

  • Wiki-fying a text using LPeg

    - by Stigma
    Long story coming up, but I'll try to keep it brief. I have many pure-text paragraphs which I extract from a system and re-output in wiki format so that the copying of said data is not such an arduous task. This all goes really well, except that there are no automatic references being generated for the 'topics' we have pages for, which end up needing to be added by reading through all the text and adding it in manually by changing Topic to [[Topic]]. First requirement: each topic is only to be made clickable once, which is the first occurrence. Otherwise, it would become a really spammy linkfest, which would detract from readability. To avoid issues with topics that start with the same words Second requirement: overlapping topic names should be handled in such a way that the most 'precise' topic gets the link, and in later occurrences, the less precise topics do not get linked, since they're likely not correct. Example: topics = { "Project", "Mary", "Mr. Moore", "Project Omega"} input = "Mary and Mr. Moore work together on Project Omega. Mr. Moore hates both Mary and Project Omega, but Mary simply loves the Project." output = function_to_be_written(input) -- "[[Mary]] and [[Mr. Moore]] work together on [[Project Omega]]. Mr. Moore hates both Mary and Project Omega, but Mary simply loves the [[Project]]." Now, I quickly figured out a simple or complicated string.gsub() could not get me what I need to satisfy the second requirement, as it provides no way to say 'Consider this match as if it did not happen - I want you to backtrack further'. I need the engine to do something akin to: input = "abc def ghi" -- Looping over the input would, in this order, match the following strings: -- 1) abc def ghi -- 2) abc def -- 3) abc -- 4) def ghi -- 5) def -- 6) ghi Once a string matches an actual topic and has not been replaced before by its wikified version, it is replaced. If this topic has been replaced by a wikified version before, don't replace, but simply continue the matching at the end of the topic. (So for a topic "abc def", it would test "ghi" next in both cases.) Thus I arrive at LPeg. I have read up on it, played with it, but it is considerably complex, and while I think I need to use lpeg.Cmt and lpeg.Cs somehow, I am unable to mix the two properly to make what I want to do work. I am refraining from posting my practice attempts as they are of miserable quality and probably more likely to confuse anyone than assist in clarifying my problem. (Why do I want to use a PEG instead of writing a triple-nested loop myself? Because I don't want to, and it is a great excuse to learn PEGs.. except that I am in over my head a bit. Unless it is not possible with LPeg, the first is not an option.)

    Read the article

  • Great Customer Service Example

    - by MightyZot
    A few days ago I wrote about what I consider a poor customer service interaction with TiVo, a company that I have been faithful to for the past 12 years or so. In that post I talked about how they helped me, but I felt like I was doing something wrong at the end of the call – when in reality I was just following through with an offer that TiVo made possible through my cable company. Today I had a wonderful customer service interaction with American Express, another company that I have been loyal to for many years.(I am a Gold Card member.) I like my Amex card because I can use it for big purchases and it forces me to pay them off at the end of the month. Well, the reality is that I’m not always so good at doing that, so sometimes my payments are over a couple of months.  :) A few days ago I received an email from “American Express” fraud detection. The email stated that I should call a toll free number and have the last four digits of my card handy. I grew up during the BBS era with some creative and somewhat mischievous friends. I’ve learned to be extremely cautious with regard to my online life! So, I did what you would expect…I sent them a nice reply that said “Go screw yourself.” For the past couple of days someone has been trying to call me and I assumed it was the same prankster trying to get the last four digits of my card. The last caller left a message indicating that they were from American Express and they wanted to talk to me about my card. After looking up their customer service numbers on the www.americanexpress.com web site, I called and was put through to the fraud detection group. The rep explained that there were some charges on my wife’s card that did not fit our purchase profile. She went through each charge and, for the most part, they looked like charges my wife may have made. My wife had asked to use the card for some Christmas shopping during the same timeframe as the charges. The American Express rep very politely explained that these looked out of character to her. She continued through the charges. She listed a charge for $160 – at this point my adrenaline started kicking in. My wife said she was going to charge about $25 or $30 dollars, not $160. Next, the rep listed a charge for over $1200. Uh oh!! Now I know that my account has been compromised. I informed the rep that we definitely did not make those charges. She replied with, “that’s ok Mr Pope, we declined those charges as well as some others.” We went through the pending charges and there were a couple more that were questionable. The rep very patiently waited while I called my wife on my office phone to verify the charges. Sure enough, my wife had not ordered anything from Netflix or purchased anything with Yahoo Wallet! “No problem Mr Pope, we will remove those charges as well.” “We are going to cancel your wife’s card and send her a new one. She will receive it by 7pm tomorrow via Federal Express. Please watch your statements over the next couple of months. If you notice anything fishy, give us a call and we will take care of it for you.” (Wow, I’m thinking to myself!) “Is there anything else I can help you with Mr Pope?” “Nope, thank you very much for catching this so early and declining those charges!”, I said smiling. Apparently she could hear me smiling on the other end of the phone line because she replied with “keep smiling Mr Pope and have a good rest of your week.” Now THAT’s customer service!  Thank you American Express!!! I shall remain an ever faithful customer. Interesting…

    Read the article

  • Find ListBox from its child?

    - by Shimmy
    How do I extract the parent container of a ListBoxItem? In the following example I can go till the ListBoxItem, higher than that I get Nothing: <ListBox Name="lbAddress"> <ListBox.ItemTemplate> <DataTemplate> <Button Click="Button_Click"/> </DataTemplate> </ListBox.ItemTemplate> </ListBox> Private Sub Button_Click(sender As Button, e As RoutedEventArgs) Dim lbAddress = GetAncestor(Of ListBox) 'Result: Nothing End Sub Public Shared Function GetAncestor(Of T)(reference As DependencyObject) As T Dim parent = GetParent(reference) While parent IsNot Nothing AndAlso Not parent.GetType.Equals(GetType(T)) parent = GetVisualAncestor(Of T)(parent) End While If parent IsNot Nothing Then _ Return If(parent.GetType Is GetType(T), parent, Nothing) Return Nothing End Sub Public Function GetParent(reference As DependencyObject) As DependencyObject Dim parent As DependencyObject = Nothing If TypeOf reference Is FrameworkElement Then parent = DirectCast(reference, FrameworkElement).Parent ElseIf TypeOf reference Is FrameworkContentElement Then parent = DirectCast(reference, FrameworkContentElement).Parent End If Return If(parent, VisualTreeHelper.GetParent(reference)) End Function

    Read the article

  • C function const multidimensional-array argument strange warning

    - by rogi
    Ehllo, I'm getting some strange warning about this code: typedef double mat4[4][4]; void mprod4(mat4 r, const mat4 a, const mat4 b) { /* yes, function is empty */ } int main() { mat4 mr, ma, mb; mprod4(mr, ma, mb); } gcc output as follows: $ gcc -o test test.c test.c: In function 'main': test.c:13: warning: passing argument 2 of 'mprod4' from incompatible pointer type test.c:4: note: expected 'const double (*)[4]' but argument is of type 'double (*)[4]' test.c:13: warning: passing argument 3 of 'mprod4' from incompatible pointer type test.c:4: note: expected 'const double ()[4]' but argument is of type 'double ()[4]' defining the function as: void mprod4(mat4 r, mat4 a, mat4 b) { } OR defining matrices at main as: mat4 mr; const mat4 ma; const mat4 mb; OR calling teh function in main as: mprod4(mr, (const double(*)[4])ma, (const double(*)[4])mb); OR even defining mat4 as: typedef double mat4[16]; make teh warning go away. Wat is happening here? Am I doing something invalid? gcc version is 4.4.3 if relevant. Thanks for your attention.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >