Search Results

Search found 9872 results on 395 pages for 'preg replace callback'.

Page 22/395 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Oauth callback problem

    - by yogsma
    I am using OAuth with google data api. We have a portal only for authorized users. So when users are logged in and if they are accessing calendar page, they will be asked if they want to sync their calendars with google calendar. If yes, they will be redirected for authentication. Once user has granted access, google appends OAuth_Token to the callback URL. the callback URL was that of the page of calendar in portal. This url has its query string options encrypted. But when the redirection happens , it takes back to login page of url. url is like http://aaa.xyz.com/(encrypted part of query string) and after oauth_token is authorized, this url becomes http://aaa.xyz.com/(encrypted part of query string)&oauth_token. So the user sees the login page after redirection instead of original page. How should I handle this in code.

    Read the article

  • jquery ajax post callback - manipulation stops after the "third" call

    - by shanyu
    EDIT: The problem is not related to Boxy, I've run into the same issue when I've used JQuery 's load method. EDIT 2: When I take out link.remove() from inside the ajax callback and place it before ajax load, the problem is no more. Are there restrictions for manipulating elements inside an ajax callback function. I am using JQuery with Boxy plugin. When the 'Flag' link on the page is clicked, a Boxy modal pops-up and loads a form via ajax. When the user submits the form, the link (<a> tag) is removed and a new one is created from the ajax response. This mechanism works for, well, 3 times! After the 3rd, the callback function just does not remove/replace/append (tested several variations of manipulation) the element. The only hint I have is that after the 3rd call, the parent of the link becomes non-selectable. However I can't make anything of this. Sorry if this is a very trivial issue, I have no experience in client-side programming. The relevant html is below: <div class="flag-link"> <img class="flag-img" style="width: 16px; visibility: hidden;" src="/static/images/flag.png" alt=""/> <a class="unflagged" href="/i/flag/showform/9/1/?next=/users/1/ozgurisil">Flag</a> </div> Here is the relevant js code: $(document).ready(function() { $('div.flag-link a.unflagged').live('click', function(e){ doFlag(e); return false; }); ... }); function doFlag(e) { var link = $(e.target); var url = link.attr('href'); Boxy.load(url, {title:'Inappropriate Content', unloadOnHide:true, cache:false, behaviours: function(r) { $("#flag-form").live("submit", function(){ var post_url = $("#flag-form").attr('action'); boxy = Boxy.get(this); boxy.hideAndUnload(); $.post(post_url, $("#flag-form").serialize(), function(data){ par = link.parent(); par.append(data); alert (par.attr('class')); //BECOMES UNDEFINED AT THE 3RD CALL!! par.children('img.flag-img').css('visibility', 'visible'); link.remove(); }); return false; }); }}); }

    Read the article

  • Django Social Registration - Twitter Callback going to example.com

    - by user578888
    I have been working through installing django social registration on my webfaction account. So far I have the facebook login working. When I attempt to log in to to twitter I get the correct login page but after choosing "Allow" I am forwarded to the following URL: http://example.com/social/twitter/callback/.... where "example.com" is the actual URL it is forwarding to. I have setup the twitter app and have entered a valid oauth callback URL. I have searched the code on my developer machine for references to "example.com" but have not found any. Any help nailing this down will be greatly appreciated.

    Read the article

  • google oauth doesn't redirect to callback after authorization

    - by dstywho
    I can't seem to get google to redirect to the callback url after obtaining the auth token. By redirecting the user to the following url, the user can click grant or deny access. After that the user clicks on one of the choices, the user is not redirected back to the callback url. https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=4%2F5ETLZ84rGmRxE_yx0b-_IFDReUxe&oauth_callback=http://blahblahblah.com/user_sessions/create&oauth_version=1.0&hd=default I'm wondering if anyone knows what the problem might be. Also does google require I use something like openssl.

    Read the article

  • Outlook VBA script - find and replace text with image

    - by user2530616
    I have a e-commerce store. When I get a sale, I receive an order confirmation email which contains the name of the product sold. When the email comes through, I would like to run a script that replaces the product name eg. "red widget", with a picture of that product. Is that possible? I have found a similar code to replace text (set of numbers in this case) with a link, but I need it to replace with a picture instead. Option Explicit Sub InsertHyperLink(MyMail As MailItem) Dim body As String, re As Object, match As Variant body = MyMail.body Set re = CreateObject("vbscript.regexp") re.Pattern = "#[0-9][0-9][0-9][0-9][0-9][0-9]" For Each match In re.Execute(body) body = Replace(body, match.Value, "http://example.com/bug.html?id=" & Right(match.Value, 6), 1, -1, vbTextCompare) Next MyMail.body = body MyMail.Save End Sub example mail Order Confirmation Thanks for shopping with us today! ------------------------------------------------------ Order Number: 2209 Date Ordered: Friday 28 June, 2013 Products ------------------------------------------------------ 1 x red widget = $5.00 ------------------------------------------------------ Total: $0.00 Delivery Address xxx search text: "red widget" replace picture: redwidget.jpg

    Read the article

  • the callback sequence of viewDidAppear and viewDidDisappear between two view controllers

    - by olinYY
    As I know, there are at least two ways to present a UIViewController on another UIViewController, first is using presentModalViewController:animated: on UIViewController, another is using pushViewController:animated: on UINavigationController, it seems when 2 view controller changing their appearance, the invoke sequence of appear/disappear callbacks are different. Following is an example, A is a UINavigationController, and B is a normal view controller, the actual callback sequence are: (1) A using presentModalViewController:animated: to show B: [B viewWillAppear]; [A viewWillDisappear]; [B viewDidAppear]; [A viewDidDisappear]; (2) A using pushViewController:animated: to show B: [A viewWillDisappear]; [B viewWillAppear]; [A viewDidDisappear]; [B viewDidAppear]; So my question is that, are these different callback sequence stable, or there are no definite sequence we can rely on? If they are stable, is there any document mentions this behavior? Can anyone help? Thanks in advanced!

    Read the article

  • How to make Dajax callback into scoped object

    - by BozoJoe
    I cant seem to find a way to make django-dajaxice have its callback inside same scoped object from which made the initial call. MyViewport = Ext.extend(MyViewportUi, { initComponent: function() { MyViewport.superclass.initComponent.call(this); }, LoadRecordsCallback: function(data){ if(data!='DAJAXICE_EXCEPTION') { alert(data); } else { alert('DAJAXICE_EXCEPTION'); } }, LoadRecords: function(){ Dajaxice.Console.GetUserRecords(this.LoadRecordsCallback); } }); var blah = new MyViewport(); blah.LoadRecords(); I'm on django, and like the calling syntax to django-dajaxice. I'm using Extjs 3.2 and tried passing a Ext.createCallback but Dajax's returning eval seems to only want a string for the callback.

    Read the article

  • Android Camera takePicture function does not call Callback function

    - by Tomáš 'Guns Blazing' Frcek
    I am working on a custom Camera activity for my application. I was following the instruction from the Android Developers site here: http://developer.android.com/guide/topics/media/camera.html Everything seems to works fine, except the Callback function is not called and the picture is not saved. Here is my code: public class CameraActivity extends Activity { private Camera mCamera; private CameraPreview mPreview; private static final String TAG = "CameraActivity"; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.camera); // Create an instance of Camera mCamera = getCameraInstance(); // Create our Preview view and set it as the content of our activity. mPreview = new CameraPreview(this, mCamera); FrameLayout preview = (FrameLayout) findViewById(R.id.camera_preview); preview.addView(mPreview); Button captureButton = (Button) findViewById(R.id.button_capture); captureButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Log.v(TAG, "will now take picture"); mCamera.takePicture(null, null, mPicture); Log.v(TAG, "will now release camera"); mCamera.release(); Log.v(TAG, "will now call finish()"); finish(); } }); } private PictureCallback mPicture = new PictureCallback() { @Override public void onPictureTaken(byte[] data, Camera camera) { Log.v(TAG, "Getting output media file"); File pictureFile = getOutputMediaFile(); if (pictureFile == null) { Log.v(TAG, "Error creating output file"); return; } try { FileOutputStream fos = new FileOutputStream(pictureFile); fos.write(data); fos.close(); } catch (FileNotFoundException e) { Log.v(TAG, e.getMessage()); } catch (IOException e) { Log.v(TAG, e.getMessage()); } } }; private static File getOutputMediaFile() { String state = Environment.getExternalStorageState(); if (!state.equals(Environment.MEDIA_MOUNTED)) { return null; } else { File folder_gui = new File(Environment.getExternalStorageDirectory() + File.separator + "GUI"); if (!folder_gui.exists()) { Log.v(TAG, "Creating folder: " + folder_gui.getAbsolutePath()); folder_gui.mkdirs(); } File outFile = new File(folder_gui, "temp.jpg"); Log.v(TAG, "Returnng file: " + outFile.getAbsolutePath()); return outFile; } } After clicking the Button, I get logs: "will now take picture", "will now release camera" and "will now call finish". The activity finishes succesfully, but the Callback function was not called during the mCamera.takePicture(null, null, mPicture); function (There were no logs from the mPicture callback or getMediaOutputFile functions) and there is no file in the location that was specified. Any ideas? :) Much thanks!

    Read the article

  • How to replace the string based on an expression

    - by deepak
    I'm having a string where i'm using some placeholders to replace it with some values based on an object. It is like the following: Hello User <#= UserName #> I need to replace the <#= UserName # with a value. How can this be done with a regex? Please help. I dont want a string replace solution. There are somany placeholders and hardcoding the <#= UserName # and replace with the value is pointless

    Read the article

  • C#: How to force "calling" a method from the main thread by signaling in some way from another thread

    - by Fire-Dragon-DoL
    Sorry for long title, I don't know even the way on how to express the question I'm using a library which run a callback from a different context from the main thread (is a C Library), I created the callback in C# and when gets called I would like to just raise an event. However because I don't know what will be inside the event, I would like to find a way to invoke the method without the problem of locks and so on (otherwise the third party user will have to handle this inside the event, very ugly) Are there any way to do this? I can be totally on the wrong way but I'm thinking about winforms way to handle different threads (the .Invoke thing) Otherwise I can send a message to the message loop of the window, but I don't know a lot about message passing and if I can send "custom" messages like this Example: private uint lgLcdOnConfigureCB(int connection, System.IntPtr pContext) { OnConfigure(EventArgs.Empty); return 0U; } this callback is called from another program which I don't have control over, I would like to run OnConfigure method in the main thread (the one that handles my winform), how to do it? Or in other words, I would like to run OnConfigure without the need of thinking about locks

    Read the article

  • SystemStackError in Rails::ActiveSupport::Callbacks

    - by coreyward
    I'm building a Rails app that connects to Dropbox and syncs with a folder to update a personal site. I'm using Rails 3.0.3, Ruby 1.9.2, and the Dropbox gem. Right now I have a DropboxAccounts Controller, and two models: DropboxSession, which wraps calls to the gem with application-specific functionality, and DropboxAccount, which stores the session and settings in the database. After the user authorizes their account with Dropbox they're redirected back over and the DropboxAccount is saved with the authorized session. That all works just fine. My problem is that when I try to call Dropbox::API#create_folder(any path) I end up with a SystemStackError in lib/activesupport/callbacks.rb:421 which refers to the code below. If I remove the call to create the folder, it works. If I call create folder from another request, it works. I doubled the stack size to 16K to no avail. # This is called the first time a callback is called with a particular # key. It creates a new callback method for the key, calculating # which callbacks can be omitted because of per_key conditions. # def __create_keyed_callback(name, kind, object, &blk) #:nodoc: @_keyed_callbacks ||= {} @_keyed_callbacks[name] ||= begin str = send("_#{kind}_callbacks").compile(name, object) class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 def #{name}() #{str} end # THIS IS LINE 421 protected :#{name} RUBY_EVAL true end end I'm not very familiar with Rails yet, and I'm not sure what the intention of the code above is or why it would cause a stack overflow. I'm not using any method_missing/ghost method magic in my code. I suspected it was something with a callback serialize :files but commenting it out did nothing. My DropboxAccount model contains only a call to belongs_to :user, and DropboxSession is just a handful of methods, none of which contain callbacks. Bypassing them and using the Dropbox::Session methods directly doesn't help. I hope someone on StackOverflow can help me with this stack overflow. ;)

    Read the article

  • Replace Your Favorite Abandoned Extensions in Firefox with This List of Alternatives

    - by Asian Angel
    Have you or someone you know continued to use Firefox 3.6 because your favorite extensions were not updated for Firefox 4.0 and beyond? Perhaps you updated Firefox but lost that wonderful extension’s functionality and want it back. Then you will definitely want to look through this terrific list of alternatives and forks of popular abandoned extensions! The list that Jorge Villalobos has put together also has alternatives for some popular older themes that have been abandoned as well. Note: More alternatives are turning up as the comments section on the blog post continues to grow, so make sure to take a quick peek through those as well. Are add-ons keeping you on Firefox 3.6? [Mozilla Add-ons Blog] HTG Explains: Learn How Websites Are Tracking You Online Here’s How to Download Windows 8 Release Preview Right Now HTG Explains: Why Linux Doesn’t Need Defragmenting

    Read the article

  • Vim Regex to replace tags

    - by Rudiger Wolf
    I am lookin for a regex express to remove the email addresses from a text file. Input file: Hannah Churchman <[email protected]>; Julie Drew <[email protected]>; Output file: Hannah Churchman; Julie Drew; I thought a generic regex shuch as s/<(.*?)//g would be a good starting point but I am unable to find the right expression for use Vim? something like :%s/ <\(.*?\)>//g does not work. Error is "E486: Pattern not found:". :%s#[^ <]*>##g almost works but it leaves the space and < behind. :%s# <##g to remove the " <" remaining stuff. Any tips on how to better craft this command?

    Read the article

  • Last GUID used up - new ScottGuID unique ID to replace it

    - by Eilon
    You might have heard in recent news that the last ever GUID was used up. The GUID {FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF} was just consumed by a soon to be released project at Microsoft. Immediately after the GUID's creation the word spread around the Microsoft campuses around the globe. Microsoft's approximately 100,000 worldwide employees then started blogging, tweeting, and facebooking about the dubious "achievement." The following screenshot shows GUIDGEN (the Windows tool for creating GUIDs) with the last ever GUID. All GUIDs created by projects at Microsoft must be registered in a central repository for record keeping. This allows quick-fix engineers, security engineers, anti-malware developers, and testers to do a quick look up of an unknown GUID and find out if it belongs to Microsoft. The following screenshot shows the Microsoft GUID Tracker internal application and the last few GUIDs being used up by various Microsoft projects. What is perhaps more interesting than the news about the GUID is the project that used that last GUID. The recent announcements regarding the development experience for the Windows Phone 7 Series (WP7S) all involve free editions of Visual Studio 2010. One of the lesser known developer tools is based on a resurrected project that many of you are probably familiar with, but have never used. The tool is in fact Microsoft Bob 7 Series (MB7S). MB7S is an agent-based approach for mobile phone app development. The UI incorporates both natural language interfaces and motion gesture behaviors, similar to the Windows Phone 7 Series “Metro” interface. If it works, it will help to expand the breadth of mobile app developers. After the GUID: The ScottGuID It came as no big surprise that eventually the last GUID would be used up. Knowing this, a group of engineers at Microsoft has designed, implemented, and tested a replacement to the GUID: The ScottGuID. There are several core principles of the ScottGuID: 1. The concepts used in ScottGuIDs must be easily understood by a developer who is already familiar with GUIDs 2. There must exist a compatibility layer between ScottGuIDs and GUIDs 3. A ScottGuID must be usable in a practical manner in non-computing environments 4. There must exist ScottGuID APIs for all common platforms: Win32/Win64/WinCE, .NET (incl. Silverlight), Linux, FreeBSD, MacOS (incl. iPhone OS), Symbian, RIM BlackBerry, Google Android, etc. 5. ScottGuIDs must never run out ScottGuID use cases One of the more subtle principles of the ScottGuID is principle #3. While technically a GUID could be used in any environment, it was not practical to do so in terms of data entry and error detection. In order to have the ScottGuID be a true universal ID it must be usable in non-computing environments. Prior to the announcement of the ScottGuID there have been a number of until-now confidential projects. One of the tools that will soon become public is ScottGuIDGen, which is in essence an updated version of GUIDGEN that can create ScottGuIDs. The following screenshot shows a sample ScottGuID. To demonstrate the various applications of the ScottGuID there were test deployments around the globe. The following examples are a small showcase of the applications that have already been prototyped. Log in to Hotmail: Pay for gas: Sign in to Twitter: Dispense cat food: Conclusion I hope that this brief introduction to the ScottGuID shows how technology can continue to move forward, even when it appears there is a point that cannot be passed. With a small number of principles, a team of smart engineers, and a passion for "getting it right" the ScottGuID should last well past our lifetimes. In the coming months expect further announcements regarding additional developer tools, samples, whitepapers, podcasts, and videos. Please leave a comment on this post if you have any questions about the ScottGuID or what you would like to see us do with it. With ScottGuID, the possibilities are nearly endless and we want to stretch their reach as far as possible.

    Read the article

  • Replace Javascript click event with timed event?

    - by Rik
    Hi, I've found some javascript code that layers photos on top of each other when you click on them. Rather than having to click I'd like the function to automatically run every 5 seconds. How can I change this event to a timed one: $('a#nextImage, #image img').click(function(event){ Full code below. Thanks <script type="text/javascript"> $(document).ready(function(){ $('#description').css({'display':'block'}); $('#image img').hover(function() { $(this).addClass('hover'); }, function() { $(this).removeClass('hover'); }); $('a#nextImage, #image img').click(function(event){ event.preventDefault(); $('#description p:first-child').css({'visibility':'hidden'}); if($('#image img.current').next().length){ $('#image img.current').removeClass('current').next().fadeIn('normal').addClass('current').css({'position':'absolute'}); }else{ $('#image img').removeClass('current').css({'display':'none'}); $('#image img:first-child').fadeIn('normal').addClass('current').css({'position':'absolute'}); } if($('#image img.current').width()>=($('#page').width()-100)){ xPos=170; }else{ do{ xPos = 120 + (Math.floor(Math.random()*($('#page').width()-100))); }while(xPos+$('#image img.current').width()>$('#page').width()); } if($('#image img.current').height()>=300){ yPos=0; }else{ do{ yPos = Math.floor(Math.random()*300); }while(yPos+$('#image img.current').height()>300); } $('#image img.current').css({'left':xPos,'top':yPos}); }); });

    Read the article

  • SQL SERVER – Tricks to Replace SELECT * with Column Names – SQL in Sixty Seconds #017 – Video

    - by pinaldave
    You might have heard many times that one should not use SELECT * as there are many disadvantages to the usage of the SELECT *. I also believe that there are always rare occasion when we need every single column of the query. In most of the cases, we only need a few columns of the query and we should retrieve only those columns. SELECT * has many disadvantages. Let me list a few and remaining you can add as a comment.  Retrieves unnecessary columns and increases network traffic When a new columns are added views needs to be refreshed manually Leads to usage of sub-optimal execution plan Uses clustered index in most of the cases instead of using optimal index It is difficult to debug. There are two quick tricks I have discussed in the video which explains how users can avoid using SELECT * but instead list the column names. 1) Drag the columns folder from SQL Server Management Studio to Query Editor 2) Right Click on Table Name >> Script TAble AS >> SELECT To… >> Select option It is extremely easy to list the column names in the table. In today’s sixty seconds video, you will notice that I was able to demonstrate both the methods very quickly. From now onwards there should be no excuse for not listing ColumnName. Let me ask a question back – is there ever a reason to SELECT *? If yes, would you please share that as a comment. More on SELECT *: SQL SERVER – Solution – Puzzle – SELECT * vs SELECT COUNT(*) SQL SERVER – Puzzle – SELECT * vs SELECT COUNT(*) SQL SERVER – SELECT vs. SET Performance Comparison I encourage you to submit your ideas for SQL in Sixty Seconds. We will try to accommodate as many as we can. If we like your idea we promise to share with you educational material. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: Database, Pinal Dave, PostADay, SQL, SQL Authority, SQL in Sixty Seconds, SQL Query, SQL Scripts, SQL Server, SQL Server Management Studio, SQL Tips and Tricks, T SQL, Technology, Video

    Read the article

  • Can we replace XML with JSON entirely?

    - by Saeed Neamati
    I'm sure lots of developers are familiar with XML and JSON, and they've used both of them. Thus no point in explaining what they are, and what is their purpose, even in brief. If we try to map their concepts, we can say (correct me if I'm wrong): XML tags are equivalent to JSON {} XML attributes are equivalent to JSON properties XML tag collection is equivalent to JSON [] The only thing I can think of, which doesn't exist in JSON, is XML Namespaces. The question is, considering this mapping, and considering that JSON is highly lighter in this mapping, can we see a world in future (or at least theoretically think of a world) without XML, but with JSON doing everything XML does? Can we use JSON everywhere XML is used? PS: Please note that I've seen this question. It's something entirely different from what I'm asking here. Thus please don't mention duplicate.

    Read the article

  • Can't replace MDM Display Manager with LightDM!

    - by Naveen
    Well, I installed MDM, and found it's buggy with my VGA hardware due to the following screen after rebooting: This screen repeats, even if I choose Yes or No As I have access to the console (by pressing ALT+F2) I tried, sudo dpkg-reconfigure lightdm which gave me the following screen, Even if I choose LightDM nothing happens at the next reboot. The first screen comes back! dpkg -l | grep -i mdm command results me following, ii mdm___________1.0.4-0~webupd8~precise_____Gnome Display Mnager ii mint-mdm-themes__1.0.5-0~webupd8~precise1_____Linux Mint MDM Themes (underscores are spaces) Please help... I need LightDM login screen back! Thanks!

    Read the article

  • Excel Smart Find and Replace only specific characters

    - by Asim
    I want to change INT to INTERNATIONAL and NA to NATIONAL ASSEMBLY in whole excel workbook through an excel Macro or Find and Replace dialogue box. But when I run the macro or change it through Find and Replace dialogue box it also replace NA from CHINA last 2 characters and it became CHINATIONAL ASSEMBLY and INTERIOR to INTERNATIONALERIOR. Now, I want that Excel should only smartly find the character NA in the workbook which is not included with any other character likewise character INT which is not attach to any other character. I would be grateful if anyone give any formula, Excel Macro or anything else to overcome this issue. Thanks,

    Read the article

  • Replace %26 in htaccess to %2526

    - by Patrick
    I would like htaccess to rewrite example.com/something_%26_else into example.com/something_%2526_else. I'm importing a bunch of pages that have ampersands in the title from Mediawiki. These are encoded as %26. Drupal, for various reasons, has decided double encode the url it to have it become %2526. I simply can't create the alisis within Drupal so I have to use htaccess This is what I have as my rule so far as RewriteRule ^w/([^%26]+)\%26(.*)$ w/$1\%2526$2 [R=301] I asked this question three months ago on stackexchange and was not able to get it working. I tried hiring a contractor for this but was unable to find one. So this my last ditch effort before I completely give up. I really appreciate the help. All the best, Patrick

    Read the article

  • Codeigniter + JQuery + Processing.js to replace a Delphi App

    - by Peter Turner
    So, I've got a mandate to make our aged trillion lined Delphi app web based and it needs to make heavy use of the <canvas> element (HTML5 compatibility doesn't seem to be a big issue since we can just make our clients use a compatible browser the way we'd make them use a compatible version of Windows in the win32 environment). The Delphi app in question is almost completely database driven and will still pretty much continue to be developed as the main product. What I am tasked with is pretty much recreating a scaled down version of the program that performs the major functions of the whole program. I couldn't find any frameworks that simulate windows forms using the canvas element, I'm assuming this is probably by design since it is easier just to use HTML, well, be that as it may, I still think it would be cool to have a few of my cool controls on the web (TRichView and TVirtualTree, etc...) So my question is, to anyone who has tried this before, A.) What can we use for an IDE to code this web app (I just use emacs, but no one else in my company does)? B.) Is it a good idea to mix PHP and Processing.JS? It seems like I'm using a lot of AJAX to get anything to happen. 3 calls just for one dialog box to pop up, Loads the HTML for the dialog, Loads the XML to populate the database info on the form Loads the processing.js PJS file which draws the database info to the canvas. Is three a lot, do people usually combine all their gets into one?

    Read the article

  • Using CTAS & Exchange Partition Replace IAS for Copying Partition on Exadata

    - by Bandari Huang
    Usage Scenario: Copy data&index from one partition to another partition in a partitioned table. Solution: Create a partition definition Copy data from one partition to another partiton by 'Insert as select (IAS)' Create a nonpartitioned table by 'Create table as select (CTAS)' Convert a nonpartitioned table into a partition of partitoned table by exchangng their data segments. Rebuild unusable index Exchange Partition Convertion Mutual convertion between a partition (or subpartition) and a nonpartitioned table Mutual convertion between a hash-partitioned table and a partition of a composite *-hash partitioned table Mutual convertiton a [range | list]-partitioned table into a partition of a composite *-[range | list] partitioned table. Exchange Partition Usage Scenario High-speed data loading of new, incremental data into an existing partitioned table in DW environment Exchanging old data partitions out of a partitioned table, the data is purged from the partitioned table without actually being deleted and can be archived separately Exchange Partition Syntax ALTER TABLE schema.table EXCHANGE [PARTITION|SUBPARTITION] [partition|subprtition] WITH TABLE schema.table [INCLUDE|EXCLUDING] INDEX [WITH|WITHOUT] VALIDATION UPDATE [INDEXES|GLOBAL INDEXES] INCLUDING | EXCLUDING INDEXES Specify INCLUDING INDEXES if you want local index partitions or subpartitions to be exchanged with the corresponding table index (for a nonpartitioned table) or local indexes (for a hash-partitioned table). Specify EXCLUDING INDEXES if you want all index partitions or subpartitions corresponding to the partition and all the regular indexes and index partitions on the exchanged table to be marked UNUSABLE. If you omit this clause, then the default is EXCLUDING INDEXES. WITH | WITHOUT VALIDATION Specify WITH VALIDATION if you want Oracle Database to return an error if any rows in the exchanged table do not map into partitions or subpartitions being exchanged. Specify WITHOUT VALIDATION if you do not want Oracle Database to check the proper mapping of rows in the exchanged table. If you omit this clause, then the default is WITH VALIDATION.  UPADATE INDEX|GLOBAL INDEX Unless you specify UPDATE INDEXES, the database marks UNUSABLE the global indexes or all global index partitions on the table whose partition is being exchanged. Global indexes or global index partitions on the table being exchanged remain invalidated. (You cannot use UPDATE INDEXES for index-organized tables. Use UPDATE GLOBAL INDEXES instead.) Exchanging Partitions&Subpartitions Notes Both tables involved in the exchange must have the same primary key, and no validated foreign keys can be referencing either of the tables unless the referenced table is empty.  When exchanging partitioned index-organized tables: – The source and target table or partition must have their primary key set on the same columns, in the same order. – If key compression is enabled, then it must be enabled for both the source and the target, and with the same prefix length. – Both the source and target must be index organized. – Both the source and target must have overflow segments, or neither can have overflow segments. Also, both the source and target must have mapping tables, or neither can have a mapping table. – Both the source and target must have identical storage attributes for any LOB columns. 

    Read the article

  • XNA Deferred Shading, Replace BasicEffect

    - by Alex
    I have implemented deferred shading in my XNA 4.0 project, meaning that I need all objects to start out with the same shader "RenderGBuffer.fx". How can I use a custom Content Processor to: Not load any textures by default (I want to manually do this) Use "RenderGBuffer.fx" as the default shader instead of BasicEffect Below is the progress so far public class DeferredModelProcessor : ModelProcessor { EffectMaterialContent deferredShader; public DeferredModelProcessor() { } protected override MaterialContent ConvertMaterial(MaterialContent material, ContentProcessorContext context) { deferredShader = new EffectMaterialContent(); deferredShader.Effect = new ExternalReference<EffectContent>("DeferredShading/RenderGBuffer.fx"); return context.Convert<MaterialContent, MaterialContent>(deferredShader, typeof(MaterialProcessor).Name); } }

    Read the article

  • Thumbs Up or Thumbs Down – Intel Debuts Prototype Palm-Reading Tech to Replace Passwords [Poll]

    - by Asian Angel
    This week Intel debuted prototype palm-reading tech that could serve as a replacement for our current password system. Our question for you today is do you think this is the right direction to go for better security or do you feel this is a mistake? Photo courtesy of Jane Rahman. Needless to say password security breaches have been a hot topic as of late, so perhaps a whole new security model is in order. It would definitely eliminate the need to remember a large volume of passwords along with circumventing the problem of poor password creation/selection. At the same time the new technology would still be in the ‘early stages’ of development and may not work as well as people would like. Long-term refinement would definitely improve its performance, but would it really be worth pursuing versus the actual benefits? From the blog post: Intel researcher Sridhar Iyendar demonstrated the technology at Intel’s Developer Forum this week. Waving a hand in front of a “palm vein” detector on a computer, one of Iyendar’s assistants was logged into Windows 7, was able to view his bank account, and then once he moved away the computer locked Windows and went into sleeping mode. How to Get Pro Features in Windows Home Versions with Third Party Tools HTG Explains: Is ReadyBoost Worth Using? HTG Explains: What The Windows Event Viewer Is and How You Can Use It

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >