TABLE OF INTERACTIONS WITH
HYDROQUINIDINE
See also: antiarrhythmic agents
See also: class 1 antiarrhythmics (except lidocaine)
See also: class 1a antiarrhythmics
See also: bradycardia inducing drugs
See also: substances that tend to induce torsades de pointes
See also: torsades de pointes inducing medications (except antiparasitics, neuroleptics, methadone)
From the French ANSM drug interactions document of September 2016, p. 109
HYDROQUINIDINE RxNorm: 27220 ATC: Not found |
URINARY ALKALIZERS CLASS CODE: B05-001 |
Increase of the plasma concentrations of the hydroquinidine and risk of overdose (decrease of the renal excretion of the hydroquinidine due to alkalinizing of the urine ) |
Precaution for use Clinical monitoring, EKG, and, possibly testing of the concentrations of the hydroquinidine; if needed, adjustment of the dosage during the alkalinizing treatment and after it is stopped. |
HYDROQUINIDINE RxNorm: 27220 ATC: Not found |
DIGOXIN RxNorm: 3407 ATC: C01AA05 |
Increase of the digoxinemia due to decrease of the renal clearance of the digoxin. In addition, disorders of autoregulation (excessive bradycardia and disorders of atrioventricular conduction). |
Precaution for use Clinical monitoring and EKG. In the case of unexpected results, test the digoxinemia and adjust the dosage. |
HYDROQUINIDINE RxNorm: 27220 ATC: Not found |
ITRACONAZOLE RxNorm: 28031 ATC: J02AC02 |
Risk of tinnitis and/or loss of hearing acuity: cinchonism linked to a decrease of the hepatic metabolism of the antiarrythmic by the itraconazole |
Precaution for use Monitoring of the plasma concentrations of the antiarrythmic and possible decrease of its dosage if necessary. |


Hello
Nice to meet you.
Student ID
Student Name
Gender
Email address
Country
1
Rumesh Rauniyar
Male
<EMAIL_ADDRESS>Nepal
Student ID
Student Name
Gender
Email address
Country
1
Rumesh Rauniyar
Male
<EMAIL_ADDRESS>Nepal


--- layout: post status: publish published: true title: Vendor Minimum Requirements author: display_name: iguy login: iguy email<EMAIL_ADDRESS>url: '' author_login: iguy author_email<EMAIL_ADDRESS>wordpress_id: 611 wordpress_url: http://itsjustanotherlayer.com/?p=611 date: !binary |- MjAxMS0wOC0yNCAxMDoxOToxMSAtMDUwMA== date_gmt: !binary |- MjAxMS0wOC0yNCAxNToxOToxMSAtMDUwMA== categories: - Server Virtualization tags: [] comments: [] ---
Recently I was pulled into a slow performance issue with a VM. After looking at the standard metrics of value and seeing that none of them were really bad, I started asking some more questions. We contacted the vendor and they asked a bunch of questions back. Of course we responded being very transparent and the vendor came back and said your performance problem is due to the fact that your CPUs aren't 3.0Ghz or better. Now since we use AMD, this doesn't surprise me though none of our testing matched up to the claims the vendor made around 30% increase by using this new functionality. Our numbers say zero change in performance. So I pushed back and started reading on the requirements and this is what they list.
This is great to say and is a wonderful cop out by the support team.
"Oh wait, you don't have a 3.0Ghz box"
"Ok, what model?"
"Doesn't matter, must be 3.0Ghz or faster"
"Alright, so will my 3.0Ghz Pentium 4 that's 5+ years old be fast enough?"
Try again vendor. Be accurate and precise with your data and information at time of document creation with the expectation to deliver the right information to deliver a functional, quality product.


| DOSE: |
300 mg |
oral |
DXM |
(liquid) |
A friend had suggested trying a substance called DXM found in two cough mixtures here in South Africa. I tried it and enjoyed the first few times. Normally chugging a whole bottle and reaching the second plateau.
The time in question I drank the bottle of Cepacol and went to sleep. The Cepacol is filled with anti-hystimines so it knocks you out. I awoke and had a momentary panic as I had no idea what was 'wrong' with me. Only when I glanced the empty bottle on the table did I remember and relax and start enjoying the trip.
Keeping one's eyes open after Cepacol is quite a mission so I lay there experiencing some amazing closed eye visuals. Nothing too wayout until.........
Suddenly I was walking through a narrow little dark alley. The ground was cobbled, the buildings close together and the air heavy with smoke/smog. I looked up and saw one window with a little light flickering behind it - candlelight. Then it hit me. I was in London sometime during the Dickens era. The time of chimney sweeps, filthy children working in the coal mines and pickpockets. This was no hallucination, it felt so real I could feel and smell and hear it.
I walked around the corner looking at everything, the detail was amazing, I could see the scuff marks on the individual cobbles, the dirty edges of the window frames........ everything!! There was this old man warming himself at a fire set in a drum or bin with holes punched ito it. I asked him if I could warm myself too. He was a decidely scruffy chap. Old top hat with the top upright, torn woolly gloves and a tatty overcoat.
He welcomed me telling me to sit on a box across from him, he said his name was Jafta and that he had lots of things to tell me. From there I can remember nothing about what he told me except that it was advice to me about my life, the people I should stay away from, the friendships I should make, the direction my career should go in, where I should look for happiness. It was unbelievable!! This old beggar knew everything about me, and many things I had never known consciously or admitted to myself. I am unable to remember any of the concrete details but I know that that conversation is stored in my subconscious and I have done some drastic life changing since then.
When he finally finished talking to me I asked Jafta how he knew so much about me, my thoughts, my life, everything! He gave me the most beautiful smile and said to me ' I am you........... We're all you. I looked around and saw about 8 men all sitting around us, on the periphery. They were all smiling at me with utter beauty even though very few had teeth and were all dressed in rags similar to Jafta. They varied in age between me and Jafta. I realised that they were me at various stages in life. I have never felt so at peace and content as that moment when I realised I was sitting in the company of 9 other me's and they had been through times that I have yet to come to.
I awoke from this experience, still quite UTI and without enough sense to try and write down what Jafta had told me. None of the detail remains but if ever I had a life changing experience it was that one. I have no idea how long it lasted in real time but it felt as if I'd been talking to him all night, about 6 hours. I got off the couch and went straight to bed.
The next time I took 300mg of DXm - about 6 months later, I had a horrific time. I remember nothing about the trip (thank goodness) but I 'came to' feeling filthy and revolted. Something bad had happened to me. I felt as if the drug/Jafta was telling me that I had got what I came looking for the last time, and that everytime I went back there it would be worse for me.
I enjoyed DXM and gained something I value very much and wish others could experience, but I won't go back for a while yet.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Hebrews
1
1 Long ago God communicated frequently to our ancestors in various ways by what the prophets said and wrote.
2 But now when this final age is beginning, God has communicated to us by his own Son. God has chosen him to possess all things. By him God also created the universe.
3 God's Son is the light of God's powerful brilliance. He shows exactly what God is truly like. All things that exist—he keeps them existing by giving powerful commands. After he had achieved that all sin should be forgiven, he rose into heaven and sat down at the highest place of honor, at the right side of God the Father, where he rules with him.
4 God has made his Son to be far greater than the angels, just as his name and authority are far greater than theirs.
5 In the Scriptures no one ever reported that God said to any angel what he said to his Son:
"You are my Son!
Today I have declared to all that I am your Father!"
And he said in another Scripture passage,
"I will be his Father,
and he will be my Son."
6 When God brought his honored Son, his only Son, into the world, he commanded:
"All my angels must worship him."
7 And in the Scriptures it is written about the angels:
"God has made his angels to be spirits who serve him with power like flames of fire."
8 But in the Scriptures, it is also written about God's Son:
"You who are God will rule forever,
and you will reign justly over your kingdom.
9 You have loved people's righteous deeds and you have hated people's sinful deeds.
So God, whom you worship, has caused you to be more joyful than anyone else."
10 We also know that his Son is superior to angels because in the Scriptures it is written about God's Son,
"Lord, it was you who created the earth in the beginning.
You also made the rest of the universe, the stars and everything in the sky.
11 Those things will no longer exist, but you will keep on living forever.
They will wear out as clothing wears out.
12 You will roll them up as if they were old clothes.
Then you will change all that is in the universe for something new,
like someone putting on new clothes.
But you stay the same, and you live forever!"
13 God has never said to any angel what he said to his Son:
"Sit in the most important place next to me and rule with me
while I defeat all of your enemies for you to rule over them!"
14 The angels are only spirits whom God has sent out to serve and care for believers whom God will soon save completely, as he has promised to do for them.


public abstract class AutoEvent
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.util.ArrayList<AutoEvent> |
childEvents |
boolean |
isRunning
True when this event is active, false if not.
|
long |
localUpdateCount
Total number of times the update method has been called.
|
| Constructor and Description |
|---|
AutoEvent() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChildEvent(AutoEvent event_in)
Assign a child event to this event.
|
void |
forceStopAllChildren() |
abstract boolean |
isDone()
Determine if this event has completed.
|
abstract boolean |
isTriggered()
Determine if this event needs updating.
|
abstract void |
userForceStop()
Perform all actions needed to restore robot to a safe state if the event is prematurely
stopped.
|
abstract void |
userStart()
perform all actions needed at the start of the event
|
abstract void |
userUpdate()
Perform all actions needed during periodic update for this event
|
public long localUpdateCount
public boolean isRunning
public java.util.ArrayList<AutoEvent> childEvents
public void addChildEvent(AutoEvent event_in)
event_in
- The new event to addpublic void forceStopAllChildren()
public abstract void userStart()
public abstract void userUpdate()
public abstract void userForceStop()
public abstract boolean isTriggered()
public abstract boolean isDone()


back plz :C
name of game here
This game was developed by Willow Wind students in the in the text adenture game workshop and in the web development class.


Override the auto-installed tool location to specify the directory where the packer executable is located.
Under normal circumstances this should not be necessary to set!


Preparation time
less than 30 mins
Cooking time
30 mins to 1 hour
Serves
Serves 4
Make your leftover chicken into the ultimate comfort food with a few small additions.
This pie can be frozen, perfect for when you need comfort food in a hurry. Check the tips section for freezing instructions.
Preheat the oven to 200C/180C (fan)/Gas 6.
For the sauce, melt the butter in a heavy-bottomed saucepan, add the flour and cook slowly over a low heat for 3 minutes, or until the mixture smells toasty. Pour in the chicken stock, turn up the heat and stir constantly until simmering. Add the cream and gently simmer until the sauce until it has a syrupy consistency. Add the lemon juice and tarragon. Turn off the heat.
In another pan, gently fry the chicken, peppers and mushrooms in a knob of butter for 5 minutes, then add to the sauce.
Butter an ovenproof dish large enough to hold the chicken pie mixture with room to spare. Add the chicken mixture to the dish.
Roll out the pastry on a floured work surface, to a thickness of about ¼in/1cm. Place the pastry over the filling and carefully trim the edges. Use the trimmings to make cut-out shapes to decorate the surface of the pie. Cut a couple of air holes with a knife to allow the steam to escape. Brush the pastry with the beaten egg.
Bake the pie in the preheated oven for about 25-35 minutes. The top should be nicely browned and the filling piping hot. Remove, allow to cool slightly and serve.
You need JavaScript to view this clip.
Rolling out pastry


Artificial Intelligence for Modeling and Predicting Colorectal Cancer Tumor Progression
Settings
CRP-IRL Reward Map Selection
Reward Map:
NORMAL
DMMR
DMMR 2
PMMR 7
PMMR 10
PMMR 11
PMMR 12
PMMR 13
nick
Tumor Phylogenetic Tree Selection
Subclonal reconstruction method:
PHYLOWGS
SPRUCE
SR4
SR5
Mutation rate:
0.1
0.01
0.001
0.0001
Tumor subpopulation #:
2
4
8
16
Fine-grain subclonal reconstruction?
Visualization options
Display subclone paths?
Indicate starting state?
Indicate final state?
Number of subclone paths to visualize:
1
2
3
4
5
6
7
8
9
10
Z separation:
Visualize Tumor Progression Map
Visualization of Tumor Progression Reward Map


Software Developer with 2+ years of hands-on experience in writing efficient code. Open to learn new technologies with a can-do attitude.
Developed a single page web application for automating Asset Management to eradicate manual entry of Assets Data resulting in 90% efficiency. The project delivered end to end services to operate and maintain the university hardware/software assets available. Built interactive user interfaces with strong user-focus and implemented RESTful webservices in the backend. Improved database performance by using indexing for faster query runtime and used memcache to reduce reads. Gained hands-on experience on requirements analysis, designing, development, integration and testing .
Developed a web application for Agriculture Practices, which provides information about all stages of farming with strong focus on ease-of-use for the user. Performed regression testing using Selenium Web Driver to ensure a bug-free website
AskCake is a question answer engine which enables you to ask a question in the social network (Facebook, Gtalk, Twitter, AskCake Web) you are logged in and it routes the question to people who may know the answer. Developed Web Interfaces and integrated with Facebook API for getting the post details and open graph actions .
GPA: 3.55
GPA: 3.76
Developed a conversational bot with a strong user-needs focus for reserving a hotel. Performed web scraping using beautiful soup package to display the real time data based on user inputs. Used Wit.AI to train bot in natural language processing to analyse user phrases to a better extent.
Designed and developed an interactive website, which serves functionalities to both Admin and User which enables smooth operations in the restaurant. Leveraged functionalities to create/update menu, cart and orders, handle order fulfilments and view weekly reports. Increased performance by 20% by implementing caching and database connection pooling.
Developed a ticketing and reporting system using Spring MVC Framework. Used JPA and Hibernate for persistence of objects in database. The application handles user validations, booking, cancelling, wait-time considerations and multi-transfers in booking. Deployed the application to AWS and also, enabled login using Google Firebase Authentication
Implemented fuzzy logic in three different servers to deal with uncertain and incomplete big data by using triangular, trapezoidal member functions. Increased its scalability and performance by using Linked servers and Implemented it using Hadoop and reduced its run time by 80%.


Mitigation: - Don’t use Kerberos Unconstrained Delegation – configure servers that require delegation with Constrained Delegation.
- Configure all elevated administrator accounts to be “Account is sensitive and cannot be delegated”.
- The “Protected Users” group, available starting with Windows Server 2012 R2 Domain Functional Level also mitigates against this issue since delegation is not allowed for accounts in this group.
When the Protected Users’ group account is upgraded to the Windows Server 2012 R2 domain functional level, domain controller-based protections are automatically applied. Members of the Protected Users group who authenticate to a Windows Server 2012 R2 domain can no longer authenticate by using:
- Default credential delegation (CredSSP). Plain text credentials are not cached even when the Allow delegating default credentials Group Policy setting is enabled.
- Windows Digest. Plain text credentials are not cached even when Windows Digest is enabled.
- NTLM. The result of the NT one-way function, NTOWF, is not cached.
- Kerberos long-term keys. The keys from Kerberos initial TGT requests are typically cached so the authentication requests are not interrupted. For accounts in this group, Kerberos protocol verifies authentication at each request..
- Sign-in offline. A cached verifier is not created at sign-in.


{% extends "app/layout.html" %} {% block title %} HELLLLLLLLLLLLO {% endblock title %} {% block content %}
Welcome to locallibrary, a very basic Django website
the library has the following record counts:


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Serves
Serves 1
Dining alone doesn't have to be boring. Try this quick and easy recipe for a cheese and bean wrap.
Preheat the oven to 180C/350F/Gas 4. Line a baking tray with aluminium foil.
Mash the broad beans in a bowl, then stir in the spring onion, salami, paprika and some freshly ground black pepper.
Put the tortilla flatbread on the baking tray and spread over the chopped tomatoes. Spoon the bean mixture onto one half of the wrap and sprinkle over the grated cheese.
Fold the wrap in half and cover with the aluminium foil, scrunching the edges into a parcel.
Bake in the oven for 15-20 minutes, or until the cheese in melted.


One of the things that can be said with certainty in this new generation of games is the death of old school RPGS. Nearly all of the big names in the RPG family have stopped making turn based role playing games. But there are still some small Japanese production houses that are trying to keep the genre alive. Among them the most noteworthy is XSEED. I have been following XSEED since they started out years ago by publishing small games on the psp. Among the many games published by them one of my all time favorites is Brave story : New traveller.
 It is a tale of an ordinary peace loving boy who lives happily in a small village amongst friends. One day, quite suddenly, his friend falls ill and is admitted to a hospital. Unfortunately the hospital has no cure for the malady. But the boy, determined to cure his friend, decides to travel through unknown land of vision and fight against unforeseen dangers in order to find the cure.
In short the plot is nothing which you have not heard before. That said Brave Story hardly boring. On the contrary it is a very satisfying RPG with plenty of depth to please any RPG lover. But let is not get ahead of ourselves and take a look at what Brave Story has to offer.
Brave story is a turn based role playing game.  Or do you prefer the one who is more swift but deals weaker damage. Or maybe casting magic spells from a distance suits you better. Once you have made your choice you are thrown into the main game.
Vision is a vast and geographically varied land. There are many towns and dungeons that you will traverse with your team. Your party can have a maximum of 3 characters during combat. Battles are all random and are not limited to just dungeons. You can encounter foes while travelling on the world map as well.
The movement on the main map is familiar. Pressing X near the town or dungeon icon transports you into it where you can carry on with your business. You know killing enemies,looting, levelling up, buying new equipment and talking with NPCs. As the game progresses and you level up, your rank increases too which allows you to travel through the areas that were restricted before. Moreover it opens up a bounty system where you can collect money it for slaying monsters.
Special gemstones are unlocked after defeating certain bosses which gives the main character special abilities. These abilities can be used in the battle at the expense of Bravara points (equivalent to MP in most games). However unlike most other games the BP is replenished during the battle itself without need for a restorative.
Brave Story provides a huge roster of characters to chose from and gives
you complete freedom to customize your team. But it's quite important that
you choose strategically. The characters with whom you battle form a bond with you. This
allows you to use amazingly powerful attacks called the unity skills.
If the bond formed is strong the party member may even take blows for you if your health is
down and you return the favour as well. So on one hand the game provides incentive to choose
from many characters while on other it rewards sticking with a few.
The new members join your team as you progress through the game. It might be a difficult choice to swap out the existing members with the newer ones due to a level mismatch . You have already put in a lot of effort beefing up your team and you wouldn’t want to throw away all that hard work. But in Brave Story even the inactive members of the party keep gaining levels though at a slower rate. I loved this feature as it allowed me to experiment with various team members without worrying that those out of my party will be left behind.
As I said before vision is a vast place. And it would be impractical to commute on foot. To facilitate the long distance travels the developers were kind enough to supply a very comfortable bullock cart. Though quite sturdy this mode of transportation was surpassed by the ability to summon a dragon later on in the game. Yes you get a chance to ride the dragon. Now how cool is that!
Any good RPG has tonnes of items. Brave story does not disappoint in this respect. Each character can equip up-to 6 items. Of these 4 are used in battle and 2 are accessories that grant special abilities. You can even create your own items with the help of an accessory book. Needless to say item creation can be quite addictive and a lot more fun than just buying items from the store.
There are also plenty of side missions, about 100 in all, that can provide hours of gameplay even after beating the main game. On the downside though these missions are not available from the start. They must be unlocked by talking to the NPC'S which can be quite boring and not all side missions are all that interesting anyway. There is lot of content here to be sure but it's not all good.
The visuals of the game are pretty good. The characters are quite detailed. The environments are pleasing to the eye. The final stage of the game is noteworthy. Every attack in combat is followed by a comic book styled Kaboom, Kabash!! which may sound weird but fits with the theme of the game perfectly. There is not much to say about the music of the game except that it is not bad.
Brave story is not that original in it's ideas but it's a very well executed game. The old school feeling is what makes it so charming today. I suppose if the game came out in the PS1 era it would probably have been overlooked. But right now if you enjoy RPGs you'll love Brave story.
Akshat Jiwan Sharma


Questions are in Green
Answers are in Yellow
How do I register?
Go To www.tw-attac.com and click on 'Purchase'. Then click
on 'Click here to use our Secure Server' Once you have purchase ATTAC, I will
automatically receive email notification and request from you four (4) Tradewars
Handles. Once I receive those from you, I will send you the registration codes
for those handles.
Does ZTM save the data if it crashes or I lose my connection?
Yes, since ZTM saves the data as it scrolls across the
screen in real-time. Therefore, you only need to start off from where you
last left off
What does it mean in port listings when
i see ?? as the port amount or percentage?
That means that ATTAC does not know the amount
or percentage. Lets say you pass through a sector. ATTAC only sees the port
type so it will register a unknown amount.
Please explain further
since i am still confused. I ran CIM, shouldnt the ports change from ?? to
the actual amount?
They should but there is a chance the
might not. The reason is this. Lets say an opposing player drops a toll fig
in that section. In this case, that port does not show up on your CIM. Therefore,
ATTAC will know "see" that section and it will remain as a ??
I am using Show Nearest Fighter. I know
i have a fighter 10 hops away. Why isn't it showing up?
The reason is that ATTAC limits the total
number of sectors that it searchs. Currently the limit is 1,000,000. After
it reaches that number and it has not located a fighter, you get "No fighters
found in 10 sector radius) Mathematically, if every sector had 6 warps, searching
through a radius of 10 sectors would be 6 raised to the power of 10 which
is 60,466,176 which would take a long time.
|


Installation
To use Sketch.js in your project, just grab the latest sketch.js (or minified) from GitHub and include it in your project after jQuery.
Documentation
To see detailed documentation, take a look at the annotated source code.
Sketch.js is an easy-to-use jQuery plugin that allows you to create canvases upon which visitors can draw. The code is partially inspired by William Malone's drawing app tutorial as well as CanvasPaint.
To use Sketch.js in your project, just grab the latest sketch.js (or minified) from GitHub and include it in your project after jQuery.
To see detailed documentation, take a look at the annotated source code.
Click and drag in the box below to draw a simple black line.
Sketch.js makes it very easy to create links that function as tool buttons.
By default, any link that has a href
tag that points to the ID
of the converted canvas will automatically be considered a tool link. If the
link has a data-color
attribute then clicking it will change the color.
Similarly, a data-size
attribute will change the brush size.
Setting the data-download
on a tool link to jpeg
or
png
will create a download button for the specified format.
Click buttons to switch between tools.
Sketch.js has been tested on Chrome (OS X), Firefox (OS X), Safari (OS X), Android Browser (Honeycomb 3.1). It suffers significant performance degradation on mobile browsers due to general HTML5 Canvas performance issues.
Copyright (C) 2011 by Michael Bleigh and Intridea, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


fputcsv
(PHP 5 >= 5.1.0, PHP 7)
fputcsv — 将行格式化为 CSV 并写入文件指针
说明
int fputcsv ( resource $handle , array $fields [, string $delimiter = ',' [,
string $enclosure = '"' ]] )
fputcsv() 将一行（用 fields 数组传递）格式化为 CSV 格式并写入由 handle 指定的文
件。
参数
handle
文件指针必须是有效的，必须指向由 fopen() 或 fsockopen() 成功打开的文件(并还
未由 fclose() 关闭)。
fields
值的一个数组。
delimiter
可选的 delimiter 参数设定字段分界符（只允许一个字符）。
enclosure
可选的 enclosure 参数设定字段字段环绕符（只允许一个字符）。
返回值
返回写入字符串的长度，或者在失败时返回 FALSE。
范例
Example #1 fputcsv() 例子
以上例子会写入以下的file.csv：
aaa,bbb,ccc,dddd
123,456,789
"""aaa""","""bbb"""
注释
Note: 在读取在 Macintosh 电脑中或由其创建的文件时，如果 PHP 不能正确的识别
行结束符，启用运行时配置可选项 auto_detect_line_endings 也许可以解决此问题
。
参见
• fgetcsv() - 从文件指针中读入一行并解析 CSV 字段
User Contributed Notes 29 notes
===============================================================================
If you need to send a CSV file directly to the browser, without writing in an
external file, you can open the output and use fputcsv on it..
===============================================================================
TAB delimiting.
Using fputcsv to output a CSV with a tab delimiter is a little tricky since the
delimiter field only takes one character.
The answer is to use the chr() function. The ascii code for tab is 9, so chr
(9) returns a tab character.
==================
it should be:
you just forgot that single quotes are literal...meaning whatever you put there
that's what will come out so '\t' would be same as 't' because \ in that case
would be only used for escaping but if you use double quotes then that would
work.
===============================================================================
I've created a function for quickly generating CSV files that work with
Microsoft applications. In the field I learned a few things about generating
CSVs that are not always obvious. First, since PHP is generally *nix-based, it
makes sense that the line endings are always \n instead of \r\n. However,
certain Microsoft programs (I'm looking at you, Access 97), will fail to
recognize the CSV properly unless each line ends with \r\n. So this function
changes the line endings accordingly. Secondly, if the first column heading /
value of the CSV file begins with uppercase ID, certain Microsoft programs
(ahem, Excel 2007) will interpret the file as being in the SYLK format rather
than CSV, as described here: http://support.microsoft.com/kb/323626
This function accommodates for that as well, by forcibly enclosing that first
value in quotes (when this doesn't occur automatically). It would be fairly
simple to modify this function to use another delimiter if need be and I leave
that as an exercise to the reader. So quite simply, this function is used for
outputting CSV data to a CSV file in a way that is safe for use with Windows
applications. It takes two parameters + one optional parameter: the location of
where the file should be saved, an array of data rows, and an optional array of
column headings. (Technically you could omit the headings array and just
include it as the first row of the data, but it is often useful to keep this
data stored in different arrays in practice.)
===============================================================================
Alright, after playing a while, I'm confident the following replacement
function works in all cases, including the ones for which the native fputcsv
function fails. If fputcsv fails to work for you (particularly with mysql csv
imports), try this function as a drop-in replacement instead.
Arguments to pass in are exactly the same as for fputcsv, though I have added
an additional $mysql_null boolean which allows one to turn php null's into
mysql-insertable nulls (by default, this add-on is disabled, thus working
identically to fputcsv [except this one works!]).
===============================================================================
Utility function to output a mysql query to csv with the option to write to
file or send back to the browser as a csv attachment.
===============================================================================
A event simpler way:
$sCell)
$aRow[$iIdx] = str_replace($sEnclosure, $sEnclosure.$sEnclosure,
$sCell);
fwrite($hFile, join($aRow, $sSeparator)."\n");
}
?>
===============================================================================
Unexpected (to me) behaviour: the enclosure characters inside the strings are
doubled *unless* they're preceded by a backslash. If the enclosure is preceded
by a backslash it's considered to be already escaped.
" <-',
'NOT doubled: -> \" <-',
);
$buffer = fopen('php://temp', 'r+');
fputcsv($buffer, $data);
rewind($buffer);
$csv = fgets($buffer);
fclose($buffer);
echo $csv; // "Doubled: -> "" <-","NOT doubled: -> \" <-"
?>
As a result, the CSV file generated by my application was not correctly opened
by OpenOffice.org. The offending row and all the subsequent rows were missing
from the spreadsheet.
PHP: 5.3.2-1ubuntu4.9
OpenOffice.org: 3.2.0
===============================================================================
I converted this from the PHP source code. This replicates PHP5 functionality
exactly, whereas the other examples here do not.
===============================================================================
if you want make UTF-8 file for excel, use this:
$fp = fopen($filename, 'w');
//add BOM to fix UTF-8 in Excel
fputs($fp, $bom =( chr(0xEF) . chr(0xBB) . chr(0xBF) ));
===============================================================================
If you need to save the output to a variable (e.g. for use within a framework)
you can write to a temporary memory-wrapper and retrieve it's contents:
===============================================================================
Here is an adaption of the above code that adds support for double quotes
inside a field. (One double quote is replaced with a pair of double quotes per
the CSV format).
===============================================================================
Inspired by boonerunner's function, I wrote a smaller, faster, and more
flexible one, which also uses less memory.
I also renamed it to avoid collision or overwriting the PHP function, and gave
the 3rd and 4th parameter default values like fputcsv() uses.
This function puts all text values in $enclosure's while doubling the
$enclosure in the value, and leaves numeric values as they are.
But if the $delimiter exists in the numeric value, this value will also be put
in $enclosure's (may happen if you use a dot as the $delimiter).
function fwritecsv($handle, $fields, $delimiter = ',', $enclosure = '"') {
# Check if $fields is an array
if (!is_array($fields)) {
return false;
}
# Walk through the data array
for ($i = 0, $n = count($fields); $i < $n; $i ++) {
# Only 'correct' non-numeric values
if (!is_numeric($fields[$i])) {
# Duplicate in-value $enclusure's and put the value in $enclosure's
$fields[$i] = $enclosure . str_replace($enclosure, $enclosure .
$enclosure, $fields[$i]) . $enclosure;
}
# If $delimiter is a dot (.), also correct numeric values
if (($delimiter == '.') && (is_numeric($fields[$i]))) {
# Put the value in $enclosure's
$fields[$i] = $enclosure . $fields[$i] . $enclosure;
}
}
# Combine the data array with $delimiter and write it to the file
$line = implode($delimiter, $fields) . "\n";
fwrite($handle, $line);
# Return the length of the written data
return strlen($line);
}
===============================================================================
Output XML string as CSV with first row as column headers:
// ...
// ...
//
if($xml = simplexml_load_string($string)){
// Keep up to 12MB in memory, if becomes bigger write to temp file
$file = fopen('php://temp/maxmemory:'. (12*1024*1024), 'r+');
if($row = get_object_vars($xml->record[0])){ // First record
// First row contains column header values
foreach($row as $key => $value){
$header[] = $key;
}
fputcsv($file, $header,',','"');
foreach ($xml->record as $record) {
fputcsv($file, get_object_vars($record),',','"');
}
rewind($file);
$output = stream_get_contents($file);
fclose($file);
return $output;
}else{
return '';
}
}
?>
===============================================================================
In general I found myself wanting to get the result as a string rather than
writing it to a file, and in particular I wanted to produce a CSV using an EOL
that might not be the same as that on the server where I generated it. This is
how I solved the problem without rewriting fputcsv.
The test should produce something like the following:
"blue, sky","green, lime",red,black
white,gold,"purple, imperial","grey, slate"
"orange, burnt","pink, hot",violet,indigo
===============================================================================
Note that an empty string is not a valid delimiter!
fputcsv( $data, '' );
?>
will just save an empty file!
===============================================================================
the solution for how to solve the encoding problem while converting an array to
csv file is below.
$fp = fopen('php://memory', 'w');
//add BOM to fix UTF-8 in Excel
fputs($fp, $bom =( chr(0xEF) . chr(0xBB) . chr(0xBF) ));
// output the column headings
//fputcsv($fp, array('Topic', 'Title', 'URL', 'Keywords', 'Score',
'FB_count', 'TW_count', '|'));
if(isset($trend)){
foreach ( $trend as $myField ){
fputcsv($fp, $myField, '|');
}
}
===============================================================================
I found that the fputcsv examples for PHP 4 missed one thing, that was proper
handling of the $enclosure value when it is a quote (if a quote is passed in a
field, and it is delimited by a slash, it will be improperly handled by the
functions submitted here).
My modified function was built using the actual PHP5 source for fputcsv, with
the addition of properly reacting to the existence of a delimited quote in the
field being processed.
1 ) {
trigger_error('delimiter must be a single character',
E_USER_NOTICE);
}
/* use first character from string */
$delimiter = $delimiter[0];
}
if( $enclosure!=NULL ) {
if( strlen($enclosure) < 1 ) {
trigger_error('enclosure must be a character', E_USER_WARNING);
return false;
}elseif( strlen($enclosure) > 1 ) {
trigger_error('enclosure must be a single character',
E_USER_NOTICE);
}
/* use first character from string */
$enclosure = $enclosure[0];
}
$i = 0;
$csvline = '';
$escape_char = '\\';
$field_cnt = count($fields);
$enc_is_quote = in_array($enclosure, array('"',"'"));
reset($fields);
foreach( $fields AS $field ) {
/* enclose a field that contains a delimiter, an enclosure
character, or a newline */
if( is_string($field) && (
strpos($field, $delimiter)!==false ||
strpos($field, $enclosure)!==false ||
strpos($field, $escape_char)!==false ||
strpos($field, "\n")!==false ||
strpos($field, "\r")!==false ||
strpos($field, "\t")!==false ||
strpos($field, ' ')!==false ) ) {
$field_len = strlen($field);
$escaped = 0;
$csvline .= $enclosure;
for( $ch = 0; $ch < $field_len; $ch++ ) {
if( $field[$ch] == $escape_char && $field[$ch+1] ==
$enclosure && $enc_is_quote ) {
continue;
}elseif( $field[$ch] == $escape_char ) {
$escaped = 1;
}elseif( !$escaped && $field[$ch] == $enclosure ) {
$csvline .= $enclosure;
}else{
$escaped = 0;
}
$csvline .= $field[$ch];
}
$csvline .= $enclosure;
} else {
$csvline .= $field;
}
if( $i++ != $field_cnt ) {
$csvline .= $delimiter;
}
}
$csvline .= "\n";
return fwrite($handle, $csvline);
}
}
?>
===============================================================================
[EDIT BY danbrown AT php DOT net: This is a revised function with a few
bugfixes and improvements done by this author. The original function example
was written by arthur AT mclean DOT ws, and rewritten between by arthur AT korn
DOT ch.]
- when calling str_replace(), you must assign $cell the return value or nothing
gets saved
- when using strchr(), you should explicitly check !== FALSE, or it'll treat a
return value of 0 (found the character at string position 0) as FALSE
- Excel seems to quote not only fields containing commas, but fields containing
quotes as well, so I've added another strchr() for quotes; I'm not saying
Microsoft knows the correct way for sure, but it seems reasonable to me
- the original function put a space after each comma; that might be legal, I
don't know, but I've never seen it (and I don't think it is, because then how
would you indicate you wanted a field to start with a space other than by
quoting it?)
- the original function didn't correctly return the length of the data
outputted
Here's the function, fixed up a bit:
Drew
===============================================================================
So this is something I wrote to generically generate CSV exports from 2 arrays
and a name.
You need to provide it with e single dimension array for the headings. A
multidimensional array with the actual body . And lastly the filename you would
like to get minus the .csv and viola.
===============================================================================
Here is a way to send csv like echo does :
Moreover, this can be nicer with PHP5.3+ closures
===============================================================================
To get the mssafe_csv function below to work using PHP5, I had to change line
50 from:
fputcsv($fp, $line);
to:
fputcsv($fp, split(',', $line));
Otherwise works great! Thanks for the function.
===============================================================================
When you output csv by fputcsv, if there are any Chinese character, you may get
messy code. Then you need to set the encoding properly:
fprintf($fp, chr(0xEF).chr(0xBB).chr(0xBF)); // just add this line
fputcsv($fp, ...);
===============================================================================
There is an even easier solution to get the result of fputcsv into a variable:
===============================================================================
fputcsv doesn't have an $escape option like fgetscv. You'll have to roll your
own support in userspace.
/**
* int fputcsv ( resource $handle , array $fields [, string $delimiter = "," [,
string $enclosure = '"', [, string $escape = "\\" ]]] )
*/
function not_broken_fputcsv($handle, array $fields, $delimiter=',', $enclosure=
'"', $escape='\\')
{
foreach($fields as &$sField)
$sField = str_replace($escape, $escape . $escape, $sField);
return fputcsv($handle, $fields, $delimiter, $enclosure, $escape);
}
===============================================================================
I feel as though it should be more complicated than this, but...
function str_putcsv($fields, $delimiter = ',', $enclosure = '"', $escape_char =
'\\' ) {
foreach ($fields as &$field) {
$field = str_replace($enclosure, $escape_char.$enclosure, $field);
$field = $enclosure . $field . $enclosure;
}
return implode($delimiter, $fields) . "\n";
}
===============================================================================
Unlike fgetcsv, fputcsv doesn't provide an $escape parameter. This can lead to
trouble if you write files using fputcsv, later to be read by fgetcsv. For
example if you're using the default backslash escape character from fgetcsv and
you've written it to a file using fputcsv, the file will not be correctly read
by fgetcsv. Here's a wrapper for fputcsv that adds an $escape parameter.
/**
* int fputcsv ( resource $handle , array $fields [, string $delimiter = "," [,
string $enclosure = '"', [, string $escape = "\\" ]]] )
*/
function not_broken_fputcsv($handle, array $fields, $delimiter=',', $enclosure=
'"', $escape='\\')
{
foreach($fields as &$sField)
$sField = str_replace($escape, $escape . $escape, $sField);
return fputcsv($handle, $fields, $delimiter, $enclosure, $escape);
}
===============================================================================
Here is an adaptation to boonerunner's function for fputcsv.
It uses a 2-dimensional array.
Each sub-array is a line in the csv file which then ends up being seperated by
commas.
===============================================================================
These two handy functions allow you to use fgetcsv with a string instead of a
file handle and fputcsv to convert an array to a string instead of writing to a
file handle. Hopefully this functionality will exist natively soon. Props to
prior notes on these functions that led me to these.
===============================================================================
We had a function that wrote a single line CSV. I noticed that with enabling
auto_detect_line_endings, fputcsv would not write a newline at the end of the
file.
Enabling auto_detect_line_endings changed the fputcsv behavior to include a
newline.